/*************************************************************************************************************
Copyright (c) 2012-2015, Symphony Teleca Corporation, a Harman International Industries, Incorporated company
Copyright (c) 2016-2017, Harman International Industries, Incorporated
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
   list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
   this list of conditions and the following disclaimer in the documentation
   and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS LISTED "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS LISTED BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Attributions: The inih library portion of the source code is licensed from
Brush Technology and Ben Hoyt - Copyright (c) 2009, Brush Technology and Copyright (c) 2009, Ben Hoyt.
Complete license and copyright information can be found at
https://github.com/benhoyt/inih/commit/74d2ca064fb293bc60a77b0bd068075b293cf175.
*************************************************************************************************************/

/*
 ******************************************************************
 * MODULE : AEM - AVDECC Entity Model Types
 * MODULE SUMMARY : AVDECC Entity Model Types
 ******************************************************************
 */

#ifndef OPENAVB_AEM_TYPES_PUB_H
#define OPENAVB_AEM_TYPES_PUB_H 1

#include "openavb_types_pub.h"

#define OPENAVB_AEM_STRLEN_MAX	(64)

// Descriptors IEEE Std 1722.1-2013 clause 7.2
#define OPENAVB_AEM_DESCRIPTOR_ENTITY (0x0000)
#define OPENAVB_AEM_DESCRIPTOR_CONFIGURATION (0x0001)
#define OPENAVB_AEM_DESCRIPTOR_AUDIO_UNIT (0x0002)
#define OPENAVB_AEM_DESCRIPTOR_VIDEO_UNIT (0x0003)
#define OPENAVB_AEM_DESCRIPTOR_SENSOR_UNIT (0x0004)
#define OPENAVB_AEM_DESCRIPTOR_STREAM_INPUT (0x0005)
#define OPENAVB_AEM_DESCRIPTOR_STREAM_OUTPUT (0x0006)
#define OPENAVB_AEM_DESCRIPTOR_JACK_INPUT (0x0007)
#define OPENAVB_AEM_DESCRIPTOR_JACK_OUTPUT (0x0008)
#define OPENAVB_AEM_DESCRIPTOR_AVB_INTERFACE (0x0009)
#define OPENAVB_AEM_DESCRIPTOR_CLOCK_SOURCE (0x000a)
#define OPENAVB_AEM_DESCRIPTOR_MEMORY_OBJECT (0x000b)
#define OPENAVB_AEM_DESCRIPTOR_LOCALE (0x000c)
#define OPENAVB_AEM_DESCRIPTOR_STRINGS (0x000d)
#define OPENAVB_AEM_DESCRIPTOR_STREAM_PORT_INPUT (0x000e)
#define OPENAVB_AEM_DESCRIPTOR_STREAM_PORT_OUTPUT (0x000f)
#define OPENAVB_AEM_DESCRIPTOR_EXTERNAL_PORT_INPUT (0x0010)
#define OPENAVB_AEM_DESCRIPTOR_EXTERNAL_PORT_OUTPUT (0x0011)
#define OPENAVB_AEM_DESCRIPTOR_INTERNAL_PORT_INPUT (0x0012)
#define OPENAVB_AEM_DESCRIPTOR_INTERNAL_PORT_OUTPUT (0x0013)
#define OPENAVB_AEM_DESCRIPTOR_AUDIO_CLUSTER (0x0014)
#define OPENAVB_AEM_DESCRIPTOR_VIDEO_CLUSTER (0x0015)
#define OPENAVB_AEM_DESCRIPTOR_SENSOR_CLUSTER (0x0016)
#define OPENAVB_AEM_DESCRIPTOR_AUDIO_MAP (0x0017)
#define OPENAVB_AEM_DESCRIPTOR_VIDEO_MAP (0x0018)
#define OPENAVB_AEM_DESCRIPTOR_SENSOR_MAP (0x0019)
#define OPENAVB_AEM_DESCRIPTOR_CONTROL (0x001a)
#define OPENAVB_AEM_DESCRIPTOR_SIGNAL_SELECTOR (0x001b)
#define OPENAVB_AEM_DESCRIPTOR_MIXER (0x001c)
#define OPENAVB_AEM_DESCRIPTOR_MATRIX (0x001d)
#define OPENAVB_AEM_DESCRIPTOR_MATRIX_SIGNAL (0x001e)
#define OPENAVB_AEM_DESCRIPTOR_SIGNAL_SPLITTER (0x001f)
#define OPENAVB_AEM_DESCRIPTOR_SIGNAL_COMBINER (0x0020)
#define OPENAVB_AEM_DESCRIPTOR_SIGNAL_DEMULTIPLEXER (0x0021)
#define OPENAVB_AEM_DESCRIPTOR_SIGNAL_MULTIPLEXER (0x0022)
#define OPENAVB_AEM_DESCRIPTOR_SIGNAL_TRANSCODER (0x0023)
#define OPENAVB_AEM_DESCRIPTOR_CLOCK_DOMAIN (0x0024)
#define OPENAVB_AEM_DESCRIPTOR_CONTROL_BLOCK (0x0025)
#define OPENAVB_AEM_DESCRIPTOR_INVALID (0xffff)

// This is the total number of decriptor types
#define OPENAVB_AEM_DESCRIPTOR_COUNT (OPENAVB_AEM_DESCRIPTOR_CONTROL_BLOCK + 1)


// Stream flags IEEE Std 1722.1-2013 clause 7.2.6.1
#define OPENAVB_AEM_STREAM_FLAG_CLOCK_SYNC_SOURCE (0x0001)
#define OPENAVB_AEM_STREAM_FLAG_CLASS_A (0x0002)
#define OPENAVB_AEM_STREAM_FLAG_CLASS_B (0x0004)
#define OPENAVB_AEM_STREAM_FLAG_SUPPORTS_ENCRYPTED (0x0008)
#define OPENAVB_AEM_STREAM_FLAG_PRIMARY_BACKUP_SUPPORTED (0x0010)
#define OPENAVB_AEM_STREAM_FLAG_PRIMARY_BACKUP_VALID (0x0020)
#define OPENAVB_AEM_STREAM_FLAG_SECONDARY_BACKUP_SUPPORTED (0x0040)
#define OPENAVB_AEM_STREAM_FLAG_SECONDARY_BACKUP_VALID (0x0080)
#define OPENAVB_AEM_STREAM_FLAG_TERTIARY_BACKUP_SUPPORTED (0x0100)
#define OPENAVB_AEM_STREAM_FLAG_TERTIARY_BACKUP_VALID (0x0200)

// Jack Flags IEEE Std 1722.1-2013 clause 7.2.7.1
#define OPENAVB_AEM_JACK_FLAG_CLOCK_SYNC_SOURCE (0x0001)
#define OPENAVB_AEM_JACK_FLAG_CAPTIVE (0x0002)

// Jack Types IEEE Std 1722.1-2013 clause 7.2.7.2
#define OPENAVB_AEM_JACK_TYPE_SPEAKER (0x0000)
#define OPENAVB_AEM_JACK_TYPE_HEADPHONE (0x0001)
#define OPENAVB_AEM_JACK_TYPE_ANALOG_MICROPHONE (0x0002)
#define OPENAVB_AEM_JACK_TYPE_SPDIF (0x0003)
#define OPENAVB_AEM_JACK_TYPE_ADAT (0x0004)
#define OPENAVB_AEM_JACK_TYPE_TDIF (0x0005)
#define OPENAVB_AEM_JACK_TYPE_MADI (0x0006)
#define OPENAVB_AEM_JACK_TYPE_UNBALANCED_ANALOG (0x0007)
#define OPENAVB_AEM_JACK_TYPE_BALANCED_ANALOG (0x0008)
#define OPENAVB_AEM_JACK_TYPE_DIGITAL (0x0009)
#define OPENAVB_AEM_JACK_TYPE_MIDI (0x000a)
#define OPENAVB_AEM_JACK_TYPE_AES_EBU (0x000b)
#define OPENAVB_AEM_JACK_TYPE_COMPOSITE_VIDEO (0x000c)
#define OPENAVB_AEM_JACK_TYPE_S_VHS_VIDEO (0x000d)
#define OPENAVB_AEM_JACK_TYPE_COMPONENT_VIDEO (0x000e)
#define OPENAVB_AEM_JACK_TYPE_DVI (0x000f)
#define OPENAVB_AEM_JACK_TYPE_HDMI (0x0010)
#define OPENAVB_AEM_JACK_TYPE_UDI (0x0011)
#define OPENAVB_AEM_JACK_TYPE_DISPLAYPORT (0x0012)
#define OPENAVB_AEM_JACK_TYPE_ANTENNA (0x0013)
#define OPENAVB_AEM_JACK_TYPE_ANALOG_TUNER (0x0014)
#define OPENAVB_AEM_JACK_TYPE_ETHERNET (0x0015)
#define OPENAVB_AEM_JACK_TYPE_WIFI (0x0016)
#define OPENAVB_AEM_JACK_TYPE_USB (0x0017)
#define OPENAVB_AEM_JACK_TYPE_PCI (0x0018)
#define OPENAVB_AEM_JACK_TYPE_PCI_E (0x0019)
#define OPENAVB_AEM_JACK_TYPE_SCSI (0x001a)
#define OPENAVB_AEM_JACK_TYPE_ATA (0x001b)
#define OPENAVB_AEM_JACK_TYPE_IMAGER (0x001c)
#define OPENAVB_AEM_JACK_TYPE_IR (0x001d)
#define OPENAVB_AEM_JACK_TYPE_THUNDERBOLT (0x001e)
#define OPENAVB_AEM_JACK_TYPE_SATA (0x001f)
#define OPENAVB_AEM_JACK_TYPE_SMPTE_LTC (0x0020)
#define OPENAVB_AEM_JACK_TYPE_DIGITAL_MICROPHONE (0x0021)
#define OPENAVB_AEM_JACK_TYPE_AUDIO_MEDIA_CLOCK (0x0022)
#define OPENAVB_AEM_JACK_TYPE_VIDEO_MEDIA_CLOCK (0x0023)
#define OPENAVB_AEM_JACK_TYPE_GNSS_CLOCK (0x0024)
#define OPENAVB_AEM_JACK_TYPE_PPS (0x0025)
#define OPENAVB_AEM_JACK_TYPE_EXPANSION (0xffff)

// Interface Types IEEE Std 1722.1-2013 clause 7.2.8.1
#define OPENAVB_AEM_INTERFACE_TYPE_GPTP_GRANDMASTER_SUPPORTED (0x0001)
#define OPENAVB_AEM_INTERFACE_TYPE_GPTP_SUPPORTED (0x0002)
#define OPENAVB_AEM_INTERFACE_TYPE_SRP_SUPPORTED (0x0004)

// Clock Source Flags IEEE Std 1722.1-2013 clause 7.2.9.1
#define OPENAVB_AEM_CLOCK_SOURCE_FLAG_STREAM_ID (0x0001)
#define OPENAVB_AEM_CLOCK_SOURCE_FLAG_LOCAL_ID (0x0002)

// Clock Source Types IEEE Std 1722.1-2013 clause 7.2.9.2
#define OPENAVB_AEM_CLOCK_SOURCE_TYPE_INTERNAL (0x0000)
#define OPENAVB_AEM_CLOCK_SOURCE_TYPE_EXTERNAL (0x0001)
#define OPENAVB_AEM_CLOCK_SOURCE_TYPE_INPUT_STREAM (0x0002)
#define OPENAVB_AEM_CLOCK_SOURCE_TYPE_EXPANSION (0xffff)

// Memory Object Types IEEE Std 1722.1-2013 clause 7.2.10.1
#define OPENAVB_AEM_MEMORY_OBJECT_TYPE_FIRMWARE_IMAGE (0x0000)
#define OPENAVB_AEM_MEMORY_OBJECT_TYPE_VENDOR_SPECIFIC (0x0001)
#define OPENAVB_AEM_MEMORY_OBJECT_TYPE_CRASH_DUMP (0x0002)
#define OPENAVB_AEM_MEMORY_OBJECT_TYPE_LOG_OBJECT (0x0003)
#define OPENAVB_AEM_MEMORY_OBJECT_TYPE_AUTOSTART_SETTINGS (0x0004)
#define OPENAVB_AEM_MEMORY_OBJECT_TYPE_SNAPSHOT_SETTINGS (0x0005)
#define OPENAVB_AEM_MEMORY_OBJECT_TYPE_SVG_MANUFACTURER (0x0006)
#define OPENAVB_AEM_MEMORY_OBJECT_TYPE_SVG_ENTITY (0x0007)
#define OPENAVB_AEM_MEMORY_OBJECT_TYPE_SVG_GENERIC (0x0008)
#define OPENAVB_AEM_MEMORY_OBJECT_TYPE_PNG_MANUFACTURER (0x0009)
#define OPENAVB_AEM_MEMORY_OBJECT_TYPE_PNG_ENTITY (0x000a)
#define OPENAVB_AEM_MEMORY_OBJECT_TYPE_PNG_GENERIC (0x000b)
#define OPENAVB_AEM_MEMORY_OBJECT_TYPE_DAE_MANUFACTURER (0x000c)
#define OPENAVB_AEM_MEMORY_OBJECT_TYPE_DAE_ENTITY (0x000d)
#define OPENAVB_AEM_MEMORY_OBJECT_TYPE_DAE_GENERIC (0x000e)

// Memory Object Operation Types IEEE Std 1722.1-2013 clause 7.2.10.2
#define OPENAVB_AEM_MEMORY_OBJECT_OPERATION_TYPE_STORE (0x0000)
#define OPENAVB_AEM_MEMORY_OBJECT_OPERATION_TYPE_STORE_AND_REBOOT (0x0001)
#define OPENAVB_AEM_MEMORY_OBJECT_OPERATION_TYPE_READ (0x0002)
#define OPENAVB_AEM_MEMORY_OBJECT_OPERATION_TYPE_ERASE (0x0003)
#define OPENAVB_AEM_MEMORY_OBJECT_OPERATION_TYPE_UPLOAD (0x0004)

// Port Flags IEEE Std 1722.1-2013 clause 7.2.13.1
#define OPENAVB_AEM_PORT_FLAG_CLOCK_SYNC_SOURCE (0x0001)
#define OPENAVB_AEM_PORT_FLAG_ASYNC_SAMPLE_RATE_CONV (0x0002)
#define OPENAVB_AEM_PORT_FLAG_SYNC_SAMPLE_RATE_CONV (0x0004)

// Audio Cluster Formats IEEE Std 1722.1-2013 clause 7.2.16.1
#define OPENAVB_AEM_AUDIO_CLUSTER_FORMAT_IEC_60958 (0x00)
#define OPENAVB_AEM_AUDIO_CLUSTER_FORMAT_MBLA (0x40)
#define OPENAVB_AEM_AUDIO_CLUSTER_FORMAT_MIDI (0x80)
#define OPENAVB_AEM_AUDIO_CLUSTER_FORMAT_SMPTE (0x88)

// Video Cluster Formats IEEE Std 1722.1-2013 clause 7.2.17.1
#define OPENAVB_AEM_VIDEO_CLUSTER_FORMAT_MPEG_PES_FORMAT (0x00)
#define OPENAVB_AEM_VIDEO_CLUSTER_FORMAT_AVTP_FORMAT (0x01)
#define OPENAVB_AEM_VIDEO_CLUSTER_FORMAT_RTP_PAYLOAD_FORMAT (0x02)
#define OPENAVB_AEM_VIDEO_CLUSTER_FORMAT_VENDOR_SPECIFIC_FORMAT (0xfe)
#define OPENAVB_AEM_VIDEO_CLUSTER_FORMAT_EXPERIMENTAL_FORMAT (0xff)

// Control Value Type Max Counts IEEE Std 1722.1-2013 clause 7.2.22
#define OPENAVB_AEM_VALUE_MAX_COUNT_CONTROL_LINEAR_INT8 (40)
#define OPENAVB_AEM_VALUE_MAX_COUNT_CONTROL_LINEAR_UINT8 (40)
#define OPENAVB_AEM_VALUE_MAX_COUNT_CONTROL_LINEAR_INT16 (25)
#define OPENAVB_AEM_VALUE_MAX_COUNT_CONTROL_LINEAR_UINT16 (25)
#define OPENAVB_AEM_VALUE_MAX_COUNT_CONTROL_LINEAR_INT32 (14)
#define OPENAVB_AEM_VALUE_MAX_COUNT_CONTROL_LINEAR_UINT32 (14)
#define OPENAVB_AEM_VALUE_MAX_COUNT_CONTROL_LINEAR_INT64 (7)
#define OPENAVB_AEM_VALUE_MAX_COUNT_CONTROL_LINEAR_UINT64 (7)
#define OPENAVB_AEM_VALUE_MAX_COUNT_CONTROL_LINEAR_FLOAT (14)
#define OPENAVB_AEM_VALUE_MAX_COUNT_CONTROL_LINEAR_DOUBLE (7)
#define OPENAVB_AEM_VALUE_MAX_COUNT_CONTROL_SELECTOR_INT8 (400)
#define OPENAVB_AEM_VALUE_MAX_COUNT_CONTROL_SELECTOR_UINT8 (400)
#define OPENAVB_AEM_VALUE_MAX_COUNT_CONTROL_SELECTOR_INT16 (199)
#define OPENAVB_AEM_VALUE_MAX_COUNT_CONTROL_SELECTOR_UINT16 (199)
#define OPENAVB_AEM_VALUE_MAX_COUNT_CONTROL_SELECTOR_INT32 (98)
#define OPENAVB_AEM_VALUE_MAX_COUNT_CONTROL_SELECTOR_UINT32 (98)
#define OPENAVB_AEM_VALUE_MAX_COUNT_CONTROL_SELECTOR_INT64 (48)
#define OPENAVB_AEM_VALUE_MAX_COUNT_CONTROL_SELECTOR_UINT64 (48)
#define OPENAVB_AEM_VALUE_MAX_COUNT_CONTROL_SELECTOR_FLOAT (98)
#define OPENAVB_AEM_VALUE_MAX_COUNT_CONTROL_SELECTOR_DOUBLE (48)
#define OPENAVB_AEM_VALUE_MAX_COUNT_CONTROL_SELECTOR_STRING (199)
#define OPENAVB_AEM_VALUE_MAX_COUNT_CONTROL_ARRAY_INT8 (396)
#define OPENAVB_AEM_VALUE_MAX_COUNT_CONTROL_ARRAY_UINT8 (396)
#define OPENAVB_AEM_VALUE_MAX_COUNT_CONTROL_ARRAY_INT16 (196)
#define OPENAVB_AEM_VALUE_MAX_COUNT_CONTROL_ARRAY_UINT16 (196)
#define OPENAVB_AEM_VALUE_MAX_COUNT_CONTROL_ARRAY_INT32 (96)
#define OPENAVB_AEM_VALUE_MAX_COUNT_CONTROL_ARRAY_UINT32 (96)
#define OPENAVB_AEM_VALUE_MAX_COUNT_CONTROL_ARRAY_INT64 (46)
#define OPENAVB_AEM_VALUE_MAX_COUNT_CONTROL_ARRAY_UINT64 (46)
#define OPENAVB_AEM_VALUE_MAX_COUNT_CONTROL_ARRAY_FLOAT (96)
#define OPENAVB_AEM_VALUE_MAX_COUNT_CONTROL_ARRAY_DOUBLE (46)
#define OPENAVB_AEM_VALUE_MAX_COUNT_CONTROL_UTF8 (1)
#define OPENAVB_AEM_VALUE_MAX_COUNT_CONTROL_BODE_PLOT (29)
#define OPENAVB_AEM_VALUE_MAX_COUNT_CONTROL_SMPTE_TIME (1)
#define OPENAVB_AEM_VALUE_MAX_COUNT_CONTROL_SAMPLE_RATE (1)
#define OPENAVB_AEM_VALUE_MAX_COUNT_CONTROL_GPTP_TIME (1)
#define OPENAVB_AEM_VALUE_MAX_COUNT_CONTROL_VENDOR (1)

// Control Value Type Max Sources IEEE Std 1722.1-2013 clause 7.2.24
#define OPENAVB_AEM_MIXER_VALUE_MAX_SOURCE_CONTROL_LINEAR_INT8 (68)
#define OPENAVB_AEM_MIXER_VALUE_MAX_SOURCE_CONTROL_LINEAR_UINT8 (68)
#define OPENAVB_AEM_MIXER_VALUE_MAX_SOURCE_CONTROL_LINEAR_INT16 (67)
#define OPENAVB_AEM_MIXER_VALUE_MAX_SOURCE_CONTROL_LINEAR_UINT16 (67)
#define OPENAVB_AEM_MIXER_VALUE_MAX_SOURCE_CONTROL_LINEAR_INT32 (65)
#define OPENAVB_AEM_MIXER_VALUE_MAX_SOURCE_CONTROL_LINEAR_UINT32 (65)
#define OPENAVB_AEM_MIXER_VALUE_MAX_SOURCE_CONTROL_LINEAR_INT64 (61)
#define OPENAVB_AEM_MIXER_VALUE_MAX_SOURCE_CONTROL_LINEAR_UINT64 (61)
#define OPENAVB_AEM_MIXER_VALUE_MAX_SOURCE_CONTROL_LINEAR_FLOAT (65)
#define OPENAVB_AEM_MIXER_VALUE_MAX_SOURCE_CONTROL_LINEAR_DOUBLE (61)

// Matrix Control Value Type Max Counts IEEE Std 1722.1-2013 clause 7.2.25
#define OPENAVB_AEM_MATRIX_VALUE_MAX_COUNT_CONTROL_LINEAR_UINT32 (14)
#define OPENAVB_AEM_MATRIX_VALUE_MAX_COUNT_CONTROL_LINEAR_INT64 (7)
#define OPENAVB_AEM_MATRIX_VALUE_MAX_COUNT_CONTROL_LINEAR_UINT64 (7)
#define OPENAVB_AEM_MATRIX_VALUE_MAX_COUNT_CONTROL_LINEAR_FLOAT (14)
#define OPENAVB_AEM_MATRIX_VALUE_MAX_COUNT_CONTROL_LINEAR_DOUBLE (7)
#define OPENAVB_AEM_MATRIX_VALUE_MAX_COUNT_CONTROL_SELECTOR_INT8 (400)
#define OPENAVB_AEM_MATRIX_VALUE_MAX_COUNT_CONTROL_SELECTOR_UINT8 (400)
#define OPENAVB_AEM_MATRIX_VALUE_MAX_COUNT_CONTROL_SELECTOR_INT16 (199)
#define OPENAVB_AEM_MATRIX_VALUE_MAX_COUNT_CONTROL_SELECTOR_UINT16 (199)
#define OPENAVB_AEM_MATRIX_VALUE_MAX_COUNT_CONTROL_SELECTOR_INT32 (98)
#define OPENAVB_AEM_MATRIX_VALUE_MAX_COUNT_CONTROL_SELECTOR_UINT32 (98)
#define OPENAVB_AEM_MATRIX_VALUE_MAX_COUNT_CONTROL_SELECTOR_INT64 (48)
#define OPENAVB_AEM_MATRIX_VALUE_MAX_COUNT_CONTROL_SELECTOR_UINT64 (48)
#define OPENAVB_AEM_MATRIX_VALUE_MAX_COUNT_CONTROL_SELECTOR_FLOAT (98)
#define OPENAVB_AEM_MATRIX_VALUE_MAX_COUNT_CONTROL_SELECTOR_DOUBLE (48)
#define OPENAVB_AEM_MATRIX_VALUE_MAX_COUNT_CONTROL_UTF8 (1)
#define OPENAVB_AEM_MATRIX_VALUE_MAX_COUNT_CONTROL_BODE_PLOT (29)
#define OPENAVB_AEM_MATRIX_VALUE_MAX_COUNT_CONTROL_ARRAY_INT8 (396)
#define OPENAVB_AEM_MATRIX_VALUE_MAX_COUNT_CONTROL_ARRAY_UINT8 (396)
#define OPENAVB_AEM_MATRIX_VALUE_MAX_COUNT_CONTROL_ARRAY_INT16 (196)
#define OPENAVB_AEM_MATRIX_VALUE_MAX_COUNT_CONTROL_ARRAY_UINT16 (196)
#define OPENAVB_AEM_MATRIX_VALUE_MAX_COUNT_CONTROL_ARRAY_INT32 (96)
#define OPENAVB_AEM_MATRIX_VALUE_MAX_COUNT_CONTROL_ARRAY_UINT32 (96)
#define OPENAVB_AEM_MATRIX_VALUE_MAX_COUNT_CONTROL_ARRAY_INT64 (46)
#define OPENAVB_AEM_MATRIX_VALUE_MAX_COUNT_CONTROL_ARRAY_UINT64 (46)
#define OPENAVB_AEM_MATRIX_VALUE_MAX_COUNT_CONTROL_ARRAY_FLOAT (96)
#define OPENAVB_AEM_MATRIX_VALUE_MAX_COUNT_CONTROL_ARRAY_DOUBLE (46)
#define OPENAVB_AEM_MATRIX_VALUE_MAX_COUNT_CONTROL_SELECTOR_STRING (199)
#define OPENAVB_AEM_MATRIX_VALUE_MAX_COUNT_CONTROL_SMPTE_TIME (1)
#define OPENAVB_AEM_MATRIX_VALUE_MAX_COUNT_CONTROL_SAMPLE_RATE (1)
#define OPENAVB_AEM_MATRIX_VALUE_MAX_COUNT_CONTROL_GPTP_TIME (1)
#define OPENAVB_AEM_MATRIX_VALUE_MAX_COUNT_CONTROL_VENDOR (1)

// Transcoder Control Value Type Max Counts IEEE Std 1722.1-2013 clause 7.2.31
#define OPENAVB_AEM_TRANSCODER_VALUE_MAX_COUNT_CONTROL_LINEAR_INT8 (41)
#define OPENAVB_AEM_TRANSCODER_VALUE_MAX_COUNT_CONTROL_LINEAR_UINT8 (41)
#define OPENAVB_AEM_TRANSCODER_VALUE_MAX_COUNT_CONTROL_LINEAR_INT16 (26)
#define OPENAVB_AEM_TRANSCODER_VALUE_MAX_COUNT_CONTROL_LINEAR_UINT16 (26)
#define OPENAVB_AEM_TRANSCODER_VALUE_MAX_COUNT_CONTROL_LINEAR_INT32 (14)
#define OPENAVB_AEM_TRANSCODER_VALUE_MAX_COUNT_CONTROL_LINEAR_UINT32 (14)
#define OPENAVB_AEM_TRANSCODER_VALUE_MAX_COUNT_CONTROL_LINEAR_INT64 (8)
#define OPENAVB_AEM_TRANSCODER_VALUE_MAX_COUNT_CONTROL_LINEAR_UINT64 (8)
#define OPENAVB_AEM_TRANSCODER_VALUE_MAX_COUNT_CONTROL_LINEAR_FLOAT (14)
#define OPENAVB_AEM_TRANSCODER_VALUE_MAX_COUNT_CONTROL_LINEAR_DOUBLE (8)
#define OPENAVB_AEM_TRANSCODER_VALUE_MAX_COUNT_CONTROL_SELECTOR_INT8 (412)
#define OPENAVB_AEM_TRANSCODER_VALUE_MAX_COUNT_CONTROL_SELECTOR_UINT8 (412)
#define OPENAVB_AEM_TRANSCODER_VALUE_MAX_COUNT_CONTROL_SELECTOR_INT16 (205)
#define OPENAVB_AEM_TRANSCODER_VALUE_MAX_COUNT_CONTROL_SELECTOR_UINT16 (205)
#define OPENAVB_AEM_TRANSCODER_VALUE_MAX_COUNT_CONTROL_SELECTOR_INT32 (101)
#define OPENAVB_AEM_TRANSCODER_VALUE_MAX_COUNT_CONTROL_SELECTOR_UINT32 (101)
#define OPENAVB_AEM_TRANSCODER_VALUE_MAX_COUNT_CONTROL_SELECTOR_INT64 (49)
#define OPENAVB_AEM_TRANSCODER_VALUE_MAX_COUNT_CONTROL_SELECTOR_UINT64 (49)
#define OPENAVB_AEM_TRANSCODER_VALUE_MAX_COUNT_CONTROL_SELECTOR_FLOAT (101)
#define OPENAVB_AEM_TRANSCODER_VALUE_MAX_COUNT_CONTROL_SELECTOR_DOUBLE (49)
#define OPENAVB_AEM_TRANSCODER_VALUE_MAX_COUNT_CONTROL_ARRAY_INT8 (408)
#define OPENAVB_AEM_TRANSCODER_VALUE_MAX_COUNT_CONTROL_ARRAY_UINT8 (408)
#define OPENAVB_AEM_TRANSCODER_VALUE_MAX_COUNT_CONTROL_ARRAY_INT16 (202)
#define OPENAVB_AEM_TRANSCODER_VALUE_MAX_COUNT_CONTROL_ARRAY_UINT16 (202)
#define OPENAVB_AEM_TRANSCODER_VALUE_MAX_COUNT_CONTROL_ARRAY_INT32 (99)
#define OPENAVB_AEM_TRANSCODER_VALUE_MAX_COUNT_CONTROL_ARRAY_UINT32 (99)
#define OPENAVB_AEM_TRANSCODER_VALUE_MAX_COUNT_CONTROL_ARRAY_INT64 (47)
#define OPENAVB_AEM_TRANSCODER_VALUE_MAX_COUNT_CONTROL_ARRAY_UINT64 (47)
#define OPENAVB_AEM_TRANSCODER_VALUE_MAX_COUNT_CONTROL_ARRAY_FLOAT (99)
#define OPENAVB_AEM_TRANSCODER_VALUE_MAX_COUNT_CONTROL_ARRAY_DOUBLE (47)
#define OPENAVB_AEM_TRANSCODER_VALUE_MAX_COUNT_CONTROL_SELECTOR_STRING (205)
#define OPENAVB_AEM_TRANSCODER_VALUE_MAX_COUNT_CONTROL_SAMPLE_RATE (1)
#define OPENAVB_AEM_TRANSCODER_VALUE_MAX_COUNT_CONTROL_VENDOR (1)

// Sample rates IEEE Std 1722.1-2013 clause 7.3.1
typedef struct {
	U8 pull;
	U32 base;
} openavb_aem_sampling_rate_t;

// Sample rate pull field IEEE Std 1722.1-2013 clause 7.3.1.1
#define OPENAVB_AEM_SAMPLE_RATE_PULL_MULTI_BASE_FREQ_BY_1_0 (0)
#define OPENAVB_AEM_SAMPLE_RATE_PULL_MULTI_BASE_FREQ_BY_1_DIV_1_001 (1)
#define OPENAVB_AEM_SAMPLE_RATE_PULL_MULTI_BASE_FREQ_BY_1_001 (2)
#define OPENAVB_AEM_SAMPLE_RATE_PULL_MULTI_BASE_FREQ_BY_24_DIV_25 (3)
#define OPENAVB_AEM_SAMPLE_RATE_PULL_MULTI_BASE_FREQ_BY_25_DIV_24 (4)

// Stream formats : IIDC IEEE Std 1722.1-2013 clause 7.3.2.1.1.1
typedef struct {
	U8 sf;
} openavb_aem_stream_format_iec_61883_iidc_t;

// Stream formats : IIDC IEEE Std 1722.1-2013 clause 7.3.2.1.1.1
typedef struct {
	U8 sf;
	U8 iidc_format;
	U8 iidc_mode;
	U8 iidc_rate;
} openavb_aem_stream_format_iidc_t;

// Stream formats : IEC 61883 IEEE Std 1722.1-2013 clause 7.3.2.1.1.1
typedef struct {
	U8 sf;
	U8 fmt;
} openavb_aem_stream_format_iec_61883_t;

// Stream formats : IEC 61883-4 IEEE Std 1722.1-2013 clause 7.3.2.1.1.2
typedef struct {
	U8 sf;
	U8 fmt;
} openavb_aem_stream_format_iec_61883_4_t;

// Stream formats : IEC 61883-6 IEEE Std 1722.1-2013 clause 7.3.2.1.1.4
typedef struct {
	U8 sf;
	U8 fmt;
	U8 fdf_evt;
	U8 fdf_sfc; 
	U8 dbs;
	U8 b;
	U8 nb;
} openavb_aem_stream_format_iec_61883_6_t;

// Stream formats : IEC 61883-6 32 bit IEEE Std 1722.1-2013 clause 7.3.2.1.1.4
typedef struct {
	U8 sf;
	U8 fmt;
	U8 fdf_evt;
	U8 fdf_sfc; 
	U8 dbs;
	U8 b;
	U8 nb;
} openavb_aem_stream_format_iec_61883_6_32bit_t;

// Stream formats : IEC 61883-6 float IEEE Std 1722.1-2013 clause 7.3.2.1.1.5
typedef struct {
	U8 sf;
	U8 fmt;
	U8 fdf_evt;
	U8 fdf_sfc; 
	U8 dbs;
	U8 b;
	U8 nb;
} openavb_aem_stream_format_iec_61883_6_float_t;

// Stream formats : IEC 61883-6 float IEEE Std 1722.1-2013 clause 7.3.2.1.1.6
typedef struct {
	U8 sf;
	U8 fmt;
	U8 fdf_evt;
	U8 fdf_sfc; 
	U8 dbs;
	U8 b;
	U8 nb;
	U8 label_iec_60958_cnt;
	U8 label_mbla_cnt;
	U8 label_midi_cnt;
	U8 label_smptecnt;
} openavb_aem_stream_format_iec_61883_6_am824_t;

// Stream formats : IEC 61883-8 IEEE Std 1722.1-2013 clause 7.3.2.1.1.7
typedef struct {
	U8 sf;
	U8 fmt;
	U8 video_mode;
	U8 compress_mode;
	U8 color_space;
} openavb_aem_stream_format_iec_61883_8_t;

// Stream formats : AVTP Audio IEEE Std 1722.1-2013 clause 7.3.2.1.3
typedef struct {
	U8 nominal_sample_rate;
	U8 format;
	U8 bit_depth;
	U16 channels_per_frame;
	U16 samples_per_frame;
} openavb_aem_stream_format_avtp_audio_t;

// Stream formats : AVTP Video IEEE Std 1722.1-2013 clause 7.3.2.1.4
typedef struct {
	U8 format;
} openavb_aem_stream_format_avtp_video_t;

// Stream formats : AVTP Control IEEE Std 1722.1-2013 clause 7.3.2.1.5
typedef struct {
	U8 protocol_type;
	U8 format_id[6];
} openavb_aem_stream_format_avtp_control_t;

// Stream formats : Vendor IEEE Std 1722.1-2013 clause 7.3.2.1.6
typedef struct {
	U8 format_id[6];
} openavb_aem_stream_format_vendor_t;

// Stream formats : Experimental IEEE Std 1722.1-2013 clause 7.3.2.1.7
typedef struct {
} openavb_aem_stream_format_experimental_t;

// Stream formats : Vendor Specific IEEE Std 1722.1-2013 clause 7.3.2.2.1
typedef struct {
	U8 format_id[6];
} openavb_aem_stream_format_vendor_specific_t;

// Stream formats IEEE Std 1722.1-2013 clause 7.3.2
typedef struct {
	U8 v;
	U8 subtype;
	union {
		openavb_aem_stream_format_iec_61883_iidc_t iec_61883_iidc;
		openavb_aem_stream_format_iidc_t iidc;
		openavb_aem_stream_format_iec_61883_t iec_61883;
		openavb_aem_stream_format_iec_61883_4_t iec_61883_4;
		openavb_aem_stream_format_iec_61883_6_32bit_t iec_61883_6;
		openavb_aem_stream_format_iec_61883_6_32bit_t iec_61883_6_32bit;
		openavb_aem_stream_format_iec_61883_6_float_t iec_61883_6_float;
		openavb_aem_stream_format_iec_61883_6_am824_t iec_61883_6_am824;
		openavb_aem_stream_format_iec_61883_8_t iec_61883_8;
		openavb_aem_stream_format_avtp_audio_t avtp_audio;
		openavb_aem_stream_format_avtp_video_t avtp_video;
		openavb_aem_stream_format_avtp_control_t avtp_control;
		openavb_aem_stream_format_vendor_t vendor;
		openavb_aem_stream_format_experimental_t experimental;
		openavb_aem_stream_format_vendor_specific_t vendor_specific;
	} subtypes;
} openavb_aem_stream_format_t;


#define OPENAVB_AEM_STREAM_FORMAT_SF_IIDC (0x00)
#define OPENAVB_AEM_STREAM_FORMAT_SF_IEC_61883 (0x00)

#define OPENAVB_AEM_STREAM_FORMAT_FMT_61883_4 (0x20)
#define OPENAVB_AEM_STREAM_FORMAT_FMT_61883_6 (0x10)
#define OPENAVB_AEM_STREAM_FORMAT_FMT_61883_8 (0x01)

#define OPENAVB_AEM_STREAM_FORMAT_FDF_EVT_61883_6_AM824 (0x00)
#define OPENAVB_AEM_STREAM_FORMAT_FDF_EVT_61883_6_32BITS (0x06)
#define OPENAVB_AEM_STREAM_FORMAT_FDF_EVT_61883_6_FLOAT (0x04)


// Stream formats IEEE Std 1722.1-2013 clause 7.3.2.1
#define OPENAVB_AEM_STREAM_FORMAT_61883_IIDC_SUBTYPE (0x00)
#define OPENAVB_AEM_STREAM_FORMAT_MMA_SUBTYPE (0x01)
#define OPENAVB_AEM_STREAM_FORMAT_AVTP_AUDIO_SUBTYPE (0x02)
#define OPENAVB_AEM_STREAM_FORMAT_AVTP_VIDEO_SUBTYPE (0x03)
#define OPENAVB_AEM_STREAM_FORMAT_AVTP_CONTROL_SUBTYPE (0x04)
#define OPENAVB_AEM_STREAM_FORMAT_VENDOR_SUBTYPE (0x6f)
#define OPENAVB_AEM_STREAM_FORMAT_EXPERIMENTAL_SUBTYPE (0x7f)

// AVTP Audio Stream Sample Rates IEEE Std 1722.1-2013 7.3.2.1.3 
#define OPENAVB_AEM_AUDIO_STREAM_SAMPLE_RATE_NOT_SPECIFIED (0x0)
#define OPENAVB_AEM_AUDIO_STREAM_SAMPLE_RATE_8_KHZ (0x1)
#define OPENAVB_AEM_AUDIO_STREAM_SAMPLE_RATE_16_KHZ (0x2)
#define OPENAVB_AEM_AUDIO_STREAM_SAMPLE_RATE_32_KHZ (0x3)
#define OPENAVB_AEM_AUDIO_STREAM_SAMPLE_RATE_44_1_KHZ (0x4)
#define OPENAVB_AEM_AUDIO_STREAM_SAMPLE_RATE_48_KHZ (0x5)
#define OPENAVB_AEM_AUDIO_STREAM_SAMPLE_RATE_88_2_KHZ (0x6)
#define OPENAVB_AEM_AUDIO_STREAM_SAMPLE_RATE_96_KHZ (0x7)
#define OPENAVB_AEM_AUDIO_STREAM_SAMPLE_RATE_176_4_KHZ (0x8)
#define OPENAVB_AEM_AUDIO_STREAM_SAMPLE_RATE_192_KHZ (0x9)

// AVTP Audio Stream Format IEEE Std 1722.1-2013 7.3.2.1.3 
#define OPENAVB_AEM_AUDIO_STREAM_FORMAT_NOT_SPECIFIED (0)
#define OPENAVB_AEM_AUDIO_STREAM_FORMAT_FLOAT (1)
#define OPENAVB_AEM_AUDIO_STREAM_FORMAT_32BIT_INTEGER (2)
#define OPENAVB_AEM_AUDIO_STREAM_FORMAT_24BIT_PACKED_INTEGER (3)
#define OPENAVB_AEM_AUDIO_STREAM_FORMAT_16BIT_INTEGER (4)

// AVTP Video Stream Format IEEE Std 1722.1-2013 7.3.2.1.4
#define OPENAVB_AEM_VIDEO_STREAM_FORMAT_RESERVED (0x00)
#define OPENAVB_AEM_VIDEO_STREAM_FORMAT_AVTP_FORMAT (0x01)
#define OPENAVB_AEM_VIDEO_STREAM_FORMAT_RTP_PAYLOAD_TYPE (0x02)
#define OPENAVB_AEM_VIDEO_STREAM_FORMAT_VENDOR_SPECIFIC (0xfe)
#define OPENAVB_AEM_VIDEO_STREAM_FORMAT_EXPERIMENTAL (0xff)

// AVTP Control Stream Format IEEE Std 1722.1-2013 7.3.2.1.5
#define OPENAVB_AEM_CONTROL_STREAM_FORMAT_AUTOMOTIVE (0)
#define OPENAVB_AEM_CONTROL_STREAM_FORMAT_TSCS (3)
#define OPENAVB_AEM_CONTROL_STREAM_FORMAT_VENDOR_DEFINED (15)

// Control Value Units IEEE Std 1722.1-2013 clause 7.3.3
#define OPENAVB_AEM_UNIT_UNITLESS (0x00)
#define OPENAVB_AEM_UNIT_UNITLESS_COUNT (0x01)
#define OPENAVB_AEM_UNIT_UNITLESS_PERCENT (0x02)
#define OPENAVB_AEM_UNIT_UNITLESS_FSTOP (0x03)
#define OPENAVB_AEM_UNIT_TIME_SECONDS (0x08)
#define OPENAVB_AEM_UNIT_TIME_MINUTES (0x09)
#define OPENAVB_AEM_UNIT_TIME_HOURS (0x0a)
#define OPENAVB_AEM_UNIT_TIME_DAYS (0x0b)
#define OPENAVB_AEM_UNIT_TIME_MONTHS (0x0c)
#define OPENAVB_AEM_UNIT_TIME_YEARS (0x0d)
#define OPENAVB_AEM_UNIT_TIME_SAMPLES (0x0e)
#define OPENAVB_AEM_UNIT_TIME_FRAMES (0x0f)
#define OPENAVB_AEM_UNIT_FREQUENCY_HERTZ (0x10)
#define OPENAVB_AEM_UNIT_FREQUENCY_SEMITONES (0x11)
#define OPENAVB_AEM_UNIT_FREQUENCY_CENTS (0x12)
#define OPENAVB_AEM_UNIT_FREQUENCY_OCTAVES (0x13)
#define OPENAVB_AEM_UNIT_FREQUENCY_FPS (0x14)
#define OPENAVB_AEM_UNIT_DISTANCE_METRES (0x18)
#define OPENAVB_AEM_UNIT_TEMPERATURE_KELVIN (0x20)
#define OPENAVB_AEM_UNIT_MASS_GRAMS (0x28)
#define OPENAVB_AEM_UNIT_VOLTAGE_VOLTS (0x30)
#define OPENAVB_AEM_UNIT_VOLTAGE_DBV (0x31)
#define OPENAVB_AEM_UNIT_VOLTAGE_DBU (0x32)
#define OPENAVB_AEM_UNIT_CURRENT_AMPS (0x38)
#define OPENAVB_AEM_UNIT_POWER_WATTS (0x40)
#define OPENAVB_AEM_UNIT_POWER_DBM (0x41)
#define OPENAVB_AEM_UNIT_POWER_DBW (0x42)
#define OPENAVB_AEM_UNIT_PRESSURE_PASCALS (0x48)
#define OPENAVB_AEM_UNIT_MEMORY_BITS (0x50)
#define OPENAVB_AEM_UNIT_MEMORY_BYTES (0x51)
#define OPENAVB_AEM_UNIT_MEMORY_KIBIBYTES (0x52)
#define OPENAVB_AEM_UNIT_MEMORY_MEBIBYTES (0x53)
#define OPENAVB_AEM_UNIT_MEMORY_GIBIBYTES (0x54)
#define OPENAVB_AEM_UNIT_MEMORY_TEBIBYTES (0x55)
#define OPENAVB_AEM_UNIT_BANDWIDTH_BITS_PER_SEC (0x58)
#define OPENAVB_AEM_UNIT_BANDWIDTH_BYTES_PER_SEC (0x59)
#define OPENAVB_AEM_UNIT_BANDWIDTH_KIBIBYTES_PER_SEC (0x5a)
#define OPENAVB_AEM_UNIT_BANDWIDTH_MEBIBYTES_PER_SEC (0x5b)
#define OPENAVB_AEM_UNIT_BANDWIDTH_GIGIBYTES_PER_SEC (0x5c)
#define OPENAVB_AEM_UNIT_BANDWIDTH_TEBIBYTES_PER_SEC (0x5d)
#define OPENAVB_AEM_UNIT_LUMINOSITY_CANDELAS (0x60)
#define OPENAVB_AEM_UNIT_ENERGY_JOULES (0x68)
#define OPENAVB_AEM_UNIT_ANGLE_RADIANS (0x70)
#define OPENAVB_AEM_UNIT_FORCE_NEWTONS (0x78)
#define OPENAVB_AEM_UNIT_RESISTANCE_OHMS (0x80)
#define OPENAVB_AEM_UNIT_VELOCITY_METRES_PER_SEC (0x88)
#define OPENAVB_AEM_UNIT_VELOCITY_RADIANS_PER_SEC (0x89)
#define OPENAVB_AEM_UNIT_ACCELERATION_METRES_PER_SEC_SQUARED (0x90)
#define OPENAVB_AEM_UNIT_ACCELERATION_RADIANS_PER_SEC_SQUARED (0x91)
#define OPENAVB_AEM_UNIT_MAGNETIC_FLUX_TESLAS (0x98)
#define OPENAVB_AEM_UNIT_AREA_METRES_SQUARED (0xa0)
#define OPENAVB_AEM_UNIT_VOLUME_METRES_CUBED (0xa8)
#define OPENAVB_AEM_UNIT_VOLUME_LITRES (0xa9)
#define OPENAVB_AEM_UNIT_LOUDNESS_DB (0xb0)
#define OPENAVB_AEM_UNIT_LOUDNESS_DB_PEAK (0xb1)
#define OPENAVB_AEM_UNIT_LOUDNESS_DB_RMS (0xb2)
#define OPENAVB_AEM_UNIT_LOUDNESS_DBFS (0xb3)
#define OPENAVB_AEM_UNIT_LOUDNESS_DBFS_PEAK (0xb4)
#define OPENAVB_AEM_UNIT_LOUDNESS_DBFS_RMS (0xb5)
#define OPENAVB_AEM_UNIT_LOUDNESS_DBTP (0xb6)
#define OPENAVB_AEM_UNIT_LOUDNESS_DB_SPL_A (0xb7)
#define OPENAVB_AEM_UNIT_LOUDNESS_DB_Z (0xb8)
#define OPENAVB_AEM_UNIT_LOUDNESS_DB_SPL_C (0xb9)
#define OPENAVB_AEM_UNIT_LOUDNESS_DB_SPL (0xba)
#define OPENAVB_AEM_UNIT_LOUDNESS_LU (0xbb)
#define OPENAVB_AEM_UNIT_LOUDNESS_LUFS (0xbc)
#define OPENAVB_AEM_UNIT_LOUDNESS_DB_A (0xbd)

// Control Types IEEE Std 1722.1-2013 clause 7.3.4
#define OPENAVB_AEM_CONTROL_TYPE_ENABLE (0x90e0f00000000000ULL)
#define OPENAVB_AEM_CONTROL_TYPE_IDENTIFY (0x90e0f00000000001ULL)
#define OPENAVB_AEM_CONTROL_TYPE_MUTE (0x90e0f00000000002ULL)
#define OPENAVB_AEM_CONTROL_TYPE_INVERT (0x90e0f00000000003ULL)
#define OPENAVB_AEM_CONTROL_TYPE_GAIN (0x90e0f00000000004ULL)
#define OPENAVB_AEM_CONTROL_TYPE_ATTENUATE (0x90e0f00000000005ULL)
#define OPENAVB_AEM_CONTROL_TYPE_DELAY (0x90e0f00000000006ULL)
#define OPENAVB_AEM_CONTROL_TYPE_SRC_MODE (0x90e0f00000000007ULL)
#define OPENAVB_AEM_CONTROL_TYPE_SNAPSHOT (0x90e0f00000000008ULL)
#define OPENAVB_AEM_CONTROL_TYPE_POW_LINE_FREQ (0x90e0f00000000009ULL)
#define OPENAVB_AEM_CONTROL_TYPE_POWER_STATUS (0x90e0f0000000000aULL)
#define OPENAVB_AEM_CONTROL_TYPE_FAN_STATUS (0x90e0f0000000000bULL)
#define OPENAVB_AEM_CONTROL_TYPE_TEMPERATURE (0x90e0f0000000000cULL)
#define OPENAVB_AEM_CONTROL_TYPE_ALTITUDE (0x90e0f0000000000dULL)
#define OPENAVB_AEM_CONTROL_TYPE_ABSOLUTE_HUMIDITY (0x90e0f0000000000eULL)
#define OPENAVB_AEM_CONTROL_TYPE_RELATIVE_HUMIDITY (0x90e0f0000000000fULL)
#define OPENAVB_AEM_CONTROL_TYPE_ORIENTATION (0x90e0f00000000010ULL)
#define OPENAVB_AEM_CONTROL_TYPE_VELOCITY (0x90e0f00000000011ULL)
#define OPENAVB_AEM_CONTROL_TYPE_ACCELERATION (0x90e0f00000000012ULL)
#define OPENAVB_AEM_CONTROL_TYPE_FILTER_RESPONSE (0x90e0f00000000013ULL)
#define OPENAVB_AEM_CONTROL_TYPE_PANPOT (0x90e0f00000010000ULL)
#define OPENAVB_AEM_CONTROL_TYPE_PHANTOM (0x90e0f00000010001ULL)
#define OPENAVB_AEM_CONTROL_TYPE_AUDIO_SCALE (0x90e0f00000010002ULL)
#define OPENAVB_AEM_CONTROL_TYPE_AUDIO_METERS (0x90e0f00000010003ULL)
#define OPENAVB_AEM_CONTROL_TYPE_AUDIO_SPECTRUM (0x90e0f00000010004ULL)
#define OPENAVB_AEM_CONTROL_TYPE_SCANNING_MODE (0x90e0f00000020000ULL)
#define OPENAVB_AEM_CONTROL_TYPE_AUTO_EXP_MODE (0x90e0f00000020001ULL)
#define OPENAVB_AEM_CONTROL_TYPE_AUTO_EXP_PRIO (0x90e0f00000020002ULL)
#define OPENAVB_AEM_CONTROL_TYPE_EXP_TIME (0x90e0f00000020003ULL)
#define OPENAVB_AEM_CONTROL_TYPE_FOCUS (0x90e0f00000020004ULL)
#define OPENAVB_AEM_CONTROL_TYPE_FOCUS_AUTO (0x90e0f00000020005ULL)
#define OPENAVB_AEM_CONTROL_TYPE_IRIS (0x90e0f00000020006ULL)
#define OPENAVB_AEM_CONTROL_TYPE_ZOOM (0x90e0f00000020007ULL)
#define OPENAVB_AEM_CONTROL_TYPE_PRIVACY (0x90e0f00000020008ULL)
#define OPENAVB_AEM_CONTROL_TYPE_BACKLIGHT (0x90e0f00000020009ULL)
#define OPENAVB_AEM_CONTROL_TYPE_BRIGHTNESS (0x90e0f0000002000aULL)
#define OPENAVB_AEM_CONTROL_TYPE_CONTRAST (0x90e0f0000002000bULL)
#define OPENAVB_AEM_CONTROL_TYPE_HUE (0x90e0f0000002000cULL)
#define OPENAVB_AEM_CONTROL_TYPE_SATURATION (0x90e0f0000002000dULL)
#define OPENAVB_AEM_CONTROL_TYPE_SHARPNESS (0x90e0f0000002000eULL)
#define OPENAVB_AEM_CONTROL_TYPE_GAMMA (0x90e0f0000002000fULL)
#define OPENAVB_AEM_CONTROL_TYPE_WHITE_BAL_TEMP (0x90e0f00000020010ULL)
#define OPENAVB_AEM_CONTROL_TYPE_WHITE_BAL_TEMP_AUTO (0x90e0f00000020011ULL)
#define OPENAVB_AEM_CONTROL_TYPE_WHITE_BAL_COMP (0x90e0f00000020012ULL)
#define OPENAVB_AEM_CONTROL_TYPE_WHITE_BAL_COMP_AUTO (0x90e0f00000020013ULL)
#define OPENAVB_AEM_CONTROL_TYPE_DIGITAL_ZOOM (0x90e0f00000020014ULL)
#define OPENAVB_AEM_CONTROL_TYPE_MEDIA_PLAYLIST (0x90e0f00000030000ULL)
#define OPENAVB_AEM_CONTROL_TYPE_MEDIA_PLAYLIST_NAME (0x90e0f00000030001ULL)
#define OPENAVB_AEM_CONTROL_TYPE_MEDIA_DISK (0x90e0f00000030002ULL)
#define OPENAVB_AEM_CONTROL_TYPE_MEDIA_DISK_NAME (0x90e0f00000030003ULL)
#define OPENAVB_AEM_CONTROL_TYPE_MEDIA_TRACK (0x90e0f00000030004ULL)
#define OPENAVB_AEM_CONTROL_TYPE_MEDIA_TRACK_NAME (0x90e0f00000030005ULL)
#define OPENAVB_AEM_CONTROL_TYPE_MEDIA_SPEED (0x90e0f00000030006ULL)
#define OPENAVB_AEM_CONTROL_TYPE_MEDIA_SAMPLE_POSITION (0x90e0f00000030007ULL)
#define OPENAVB_AEM_CONTROL_TYPE_MEDIA_PLAYBACK_TRANSPORT (0x90e0f00000030008ULL)
#define OPENAVB_AEM_CONTROL_TYPE_MEDIA_RECORD_TRANSPORT (0x90e0f00000030009ULL)
#define OPENAVB_AEM_CONTROL_TYPE_FREQUENCY (0x90e0f00000040000ULL)
#define OPENAVB_AEM_CONTROL_TYPE_MODULATION (0x90e0f00000040001ULL)
#define OPENAVB_AEM_CONTROL_TYPE_POLARIZATION (0x90e0f00000040002ULL)

// Sample Rate Convertor (SRC_MODE) Mode IEEE Std 1722.1-2013 clause 7.3.4.8
#define OPENAVB_AEM_CONTROL_TYPE_SRC_MODE_OFF (0x00)
#define OPENAVB_AEM_CONTROL_TYPE_SRC_MODE_SYNCHRONOUS (0x01)
#define OPENAVB_AEM_CONTROL_TYPE_SRC_MODE_ASYNCHRONOUS (0x02)

// Snapshot Control (SNAPSHOT) IEEE Std 1722.1-2013 clause 7.3.4.9 
#define OPENAVB_AEM_CONTROL_TYPE_SNAPSHOT_CAPTURE (0x0000)
#define OPENAVB_AEM_CONTROL_TYPE_SNAPSHOT_RECALL (0x0001)
#define OPENAVB_AEM_CONTROL_TYPE_SNAPSHOT_ERASE (0x0002)

// Power Line Frequency Control (POW_LINE_FREQ) IEEE Std 1722.1-2013 clause 7.3.4.10
#define OPENAVB_AEM_CONTROL_TYPE_POW_LINE_FREQ_FIFTY_HERTZ (50)
#define OPENAVB_AEM_CONTROL_TYPE_POW_LINE_FREQ_SIXTY_HERTZ (60)

// Auto Exposure Mode Control (AUTO_EXP_MODE) IEEE Std 1722.1-2013 clause 7.3.4.27
#define OPENAVB_AEM_CONTROL_TYPE_AUTO_EXP_MODE_MANUAL (0x01)
#define OPENAVB_AEM_CONTROL_TYPE_AUTO_EXP_MODE_AUTO (0x11)
#define OPENAVB_AEM_CONTROL_TYPE_AUTO_EXP_MODE_SHUTTER_PRIO (0x21)
#define OPENAVB_AEM_CONTROL_TYPE_AUTO_EXP_MODE_APER_PRIO (0x31)

// Media Disk Selection Control (MEDIA_DISK) IEEE Std 1722.1-2013 clause 7.3.4.49
#define OPENAVB_AEM_CONTROL_TYPE_MEDIA_DISK_CHOOSE (0x0000)
#define OPENAVB_AEM_CONTROL_TYPE_MEDIA_DISK_PREVIOUS (0x0001)
#define OPENAVB_AEM_CONTROL_TYPE_MEDIA_DISK_NEXT (0x0002)
#define OPENAVB_AEM_CONTROL_TYPE_MEDIA_DISK_OPEN (0x0003)
#define OPENAVB_AEM_CONTROL_TYPE_MEDIA_DISK_CLOSE (0x0004)

// Media Playback Transport Control (MEDIA_PLAYBACK_TRANSPORT) IEEE Std 1722.1-2013 clause 7.3.4.55 
#define OPENAVB_AEM_CONTROL_TYPE_MEDIA_PLAYBACK_TRANSPORT_STOP (0x0000)
#define OPENAVB_AEM_CONTROL_TYPE_MEDIA_PLAYBACK_TRANSPORT_PLAY (0x0001)
#define OPENAVB_AEM_CONTROL_TYPE_MEDIA_PLAYBACK_TRANSPORT_PAUSE (0x0002)
#define OPENAVB_AEM_CONTROL_TYPE_MEDIA_PLAYBACK_TRANSPORT_UNPAUSE (0x0003)
#define OPENAVB_AEM_CONTROL_TYPE_MEDIA_PLAYBACK_TRANSPORT_SCAN_FORWARD (0x0004)
#define OPENAVB_AEM_CONTROL_TYPE_MEDIA_PLAYBACK_TRANSPORT_SCAN_BACKWARD (0x0005)

// Media Record Transport Control (MEDIA_RECORD_TRANSPORT) IEEE Std 1722.1-2013 clause 7.3.4.56  
#define OPENAVB_AEM_CONTROL_TYPE_MEDIA_RECORD_TRANSPORT_STOP (0x0000)
#define OPENAVB_AEM_CONTROL_TYPE_MEDIA_RECORD_TRANSPORT_PLAY (0x0001)
#define OPENAVB_AEM_CONTROL_TYPE_MEDIA_RECORD_TRANSPORT_PAUSE (0x0002)
#define OPENAVB_AEM_CONTROL_TYPE_MEDIA_RECORD_TRANSPORT_UNPAUSE (0x0003)
#define OPENAVB_AEM_CONTROL_TYPE_MEDIA_RECORD_TRANSPORT_SCAN_FORWARD (0x0004)
#define OPENAVB_AEM_CONTROL_TYPE_MEDIA_RECORD_TRANSPORT_SCAN_BACKWARD (0x0005)
#define OPENAVB_AEM_CONTROL_TYPE_MEDIA_RECORD_TRANSPORT_RECORD (0x0006)

// Modulation Control (MODULATION) IEEE Std 1722.1-2013 clause 7.3.4.58 
#define OPENAVB_AEM_CONTROL_TYPE_MODULATION_AMPLITUDE_MODULATION (0x00)
#define OPENAVB_AEM_CONTROL_TYPE_MODULATION_FREQUENCY_MODULATION (0x01)
#define OPENAVB_AEM_CONTROL_TYPE_MODULATION_PHASE_MODULATION (0x02)

// Polarization Control (POLARIZATION) IEEE Std 1722.1-2013 clause 7.3.4.59
#define OPENAVB_AEM_CONTROL_TYPE_POLARIZATION_VERTICAL (0x00)
#define OPENAVB_AEM_CONTROL_TYPE_POLARIZATION_HORIZONTAL (0x01)
#define OPENAVB_AEM_CONTROL_TYPE_POLARIZATION_LEFT_HAND_CIRCULAR (0x02)
#define OPENAVB_AEM_CONTROL_TYPE_POLARIZATION_RIGHT_HAND_CIRCULAR (0x03)

// Control_value_type IEEE Std 1722.1-2013 clause 7.3.5.1 
#define OPENAVB_AEM_CONTROL_VALUE_TYPE_CONTROL_LINEAR_INT8 (0x0000)
#define OPENAVB_AEM_CONTROL_VALUE_TYPE_CONTROL_LINEAR_UINT8 (0x0001)
#define OPENAVB_AEM_CONTROL_VALUE_TYPE_CONTROL_LINEAR_INT16 (0x0002)
#define OPENAVB_AEM_CONTROL_VALUE_TYPE_CONTROL_LINEAR_UINT16 (0x0003)
#define OPENAVB_AEM_CONTROL_VALUE_TYPE_CONTROL_LINEAR_INT32 (0x0004)
#define OPENAVB_AEM_CONTROL_VALUE_TYPE_CONTROL_LINEAR_UINT32 (0x0005)
#define OPENAVB_AEM_CONTROL_VALUE_TYPE_CONTROL_LINEAR_INT64 (0x0006)
#define OPENAVB_AEM_CONTROL_VALUE_TYPE_CONTROL_LINEAR_UINT64 (0x0007)
#define OPENAVB_AEM_CONTROL_VALUE_TYPE_CONTROL_LINEAR_FLOAT (0x0008)
#define OPENAVB_AEM_CONTROL_VALUE_TYPE_CONTROL_LINEAR_DOUBLE (0x0009)
#define OPENAVB_AEM_CONTROL_VALUE_TYPE_CONTROL_SELECTOR_INT8 (0x000a)
#define OPENAVB_AEM_CONTROL_VALUE_TYPE_CONTROL_SELECTOR_UINT8 (0x000b)
#define OPENAVB_AEM_CONTROL_VALUE_TYPE_CONTROL_SELECTOR_INT16 (0x000c)
#define OPENAVB_AEM_CONTROL_VALUE_TYPE_CONTROL_SELECTOR_UINT16 (0x000d)
#define OPENAVB_AEM_CONTROL_VALUE_TYPE_CONTROL_SELECTOR_INT32 (0x000e)
#define OPENAVB_AEM_CONTROL_VALUE_TYPE_CONTROL_SELECTOR_UINT32 (0x000f)
#define OPENAVB_AEM_CONTROL_VALUE_TYPE_CONTROL_SELECTOR_INT64 (0x0010)
#define OPENAVB_AEM_CONTROL_VALUE_TYPE_CONTROL_SELECTOR_UINT64 (0x0011)
#define OPENAVB_AEM_CONTROL_VALUE_TYPE_CONTROL_SELECTOR_FLOAT (0x0012)
#define OPENAVB_AEM_CONTROL_VALUE_TYPE_CONTROL_SELECTOR_DOUBLE (0x0013)
#define OPENAVB_AEM_CONTROL_VALUE_TYPE_CONTROL_SELECTOR_STRING (0x0014)
#define OPENAVB_AEM_CONTROL_VALUE_TYPE_CONTROL_ARRAY_INT8 (0x0015)
#define OPENAVB_AEM_CONTROL_VALUE_TYPE_CONTROL_ARRAY_UINT8 (0x0016)
#define OPENAVB_AEM_CONTROL_VALUE_TYPE_CONTROL_ARRAY_INT16 (0x0017)
#define OPENAVB_AEM_CONTROL_VALUE_TYPE_CONTROL_ARRAY_UINT16 (0x0018)
#define OPENAVB_AEM_CONTROL_VALUE_TYPE_CONTROL_ARRAY_INT32 (0x0019)
#define OPENAVB_AEM_CONTROL_VALUE_TYPE_CONTROL_ARRAY_UINT32 (0x001a)
#define OPENAVB_AEM_CONTROL_VALUE_TYPE_CONTROL_ARRAY_INT64 (0x001b)
#define OPENAVB_AEM_CONTROL_VALUE_TYPE_CONTROL_ARRAY_UINT64 (0x001c)
#define OPENAVB_AEM_CONTROL_VALUE_TYPE_CONTROL_ARRAY_FLOAT (0x001d)
#define OPENAVB_AEM_CONTROL_VALUE_TYPE_CONTROL_ARRAY_DOUBLE (0x001e)
#define OPENAVB_AEM_CONTROL_VALUE_TYPE_CONTROL_UTF8 (0x001f)
#define OPENAVB_AEM_CONTROL_VALUE_TYPE_CONTROL_BODE_PLOT (0x0020)
#define OPENAVB_AEM_CONTROL_VALUE_TYPE_CONTROL_SMPTE_TIME (0x0021)
#define OPENAVB_AEM_CONTROL_VALUE_TYPE_CONTROL_SAMPLE_RATE (0x0022)
#define OPENAVB_AEM_CONTROL_VALUE_TYPE_CONTROL_GPTP_TIME (0x0023)
#define OPENAVB_AEM_CONTROL_VALUE_TYPE_CONTROL_VENDOR (0x3ffe)
#define OPENAVB_AEM_CONTROL_VALUE_TYPE_EXPANSION (0x3fff)

// Localized String default values IEEE Std 1722.1-2013 clause 7.3.6
#define OPENAVB_AEM_NO_STRING_OFFSET (0x1fff)
#define OPENAVB_AEM_NO_STRING_INDEX (7)

// Localized String Reference IEEE Std 1722.1-2013 clause 7.3.6
typedef struct {
	U16 offset;
	U8 index;
} openavb_aem_string_ref_t;

// Control value formats IEEE Std 1722.1-2013 clause 7.3.5.2
// Values format for Linear Value Types (CONTROL_LINEAR_INT8 to CONTROL_LINEAR_DOUBLE) IEEE Std 1722.1-2013 clause 7.3.5.2.1
typedef struct {
	S8 minimum;
	S8 maximum;
	S8 step;
	S8 default_value;
	S8 current;
	U16 unit;
	openavb_aem_string_ref_t string;
} openavb_aem_control_value_format_control_linear_int8_t;

typedef struct {
	U8 minimum;
	U8 maximum;
	U8 step;
	U8 default_value;
	U8 current;
	U16 unit;
	openavb_aem_string_ref_t string;
} openavb_aem_control_value_format_control_linear_uint8_t;

typedef struct {
	S16 minimum;
	S16 maximum;
	S16 step;
	S16 default_value;
	S16 current;
	U16 unit;
	openavb_aem_string_ref_t string;
} openavb_aem_control_value_format_control_linear_int16_t;

typedef struct {
	U16 minimum;
	U16 maximum;
	U16 step;
	U16 default_value;
	U16 current;
	U16 unit;
	openavb_aem_string_ref_t string;
} openavb_aem_control_value_format_control_linear_uint16_t;

typedef struct {
	S32 minimum;
	S32 maximum;
	S32 step;
	S32 default_value;
	S32 current;
	U16 unit;
	openavb_aem_string_ref_t string;
} openavb_aem_control_value_format_control_linear_int32_t;

typedef struct {
	U32 minimum;
	U32 maximum;
	U32 step;
	U32 default_value;
	U32 current;
	U16 unit;
	openavb_aem_string_ref_t string;
} openavb_aem_control_value_format_control_linear_uint32_t;

typedef struct {
	S64 minimum;
	S64 maximum;
	S64 step;
	S64 default_value;
	S64 current;
	U16 unit;
	openavb_aem_string_ref_t string;
} openavb_aem_control_value_format_control_linear_int64_t;

typedef struct {
	U64 minimum;
	U64 maximum;
	U64 step;
	U64 default_value;
	U64 current;
	U16 unit;
	openavb_aem_string_ref_t string;
} openavb_aem_control_value_format_control_linear_uint64_t;

typedef struct {
	float minimum;
	float maximum;
	float step;
	float default_value;
	float current;
	U16 unit;
	openavb_aem_string_ref_t string;
} openavb_aem_control_value_format_control_linear_float_t;

typedef struct {
	double minimum;
	double maximum;
	double step;
	double default_value;
	double current;
	U16 unit;
	openavb_aem_string_ref_t string;
} openavb_aem_control_value_format_control_linear_double_t;


// Values format for Selector Value Types (CONTROL_SELECTOR_INT8 to CONTROL_SELECTOR_STRING) IEEE Std 1722.1-2013 clause 7.3.5.2.2
typedef struct {
	// AVDECC_TODO
} openavb_aem_control_value_format_control_selector_int8_t;

typedef struct {
	// AVDECC_TODO
} openavb_aem_control_value_format_control_selector_uint8_t;

typedef struct {
	// AVDECC_TODO
} openavb_aem_control_value_format_control_selector_int16_t;

typedef struct {
	// AVDECC_TODO
} openavb_aem_control_value_format_control_selector_uint16_t;

typedef struct {
	// AVDECC_TODO
} openavb_aem_control_value_format_control_selector_int32_t;

typedef struct {
	// AVDECC_TODO
} openavb_aem_control_value_format_control_selector_uint32_t;

typedef struct {
	// AVDECC_TODO
} openavb_aem_control_value_format_control_selector_int64_t;

typedef struct {
	// AVDECC_TODO
} openavb_aem_control_value_format_control_selector_uint64_t;

typedef struct {
	// AVDECC_TODO
} openavb_aem_control_value_format_control_selector_float_t;

typedef struct {
	// AVDECC_TODO
} openavb_aem_control_value_format_control_selector_double_t;

typedef struct {
	// AVDECC_TODO
} openavb_aem_control_value_format_control_selector_string_t;


// Values format for Array Value Types (CONTROL_ARRAY_INT8 to CONTROL_ARRAY_ARRAY_DOUBLE) IEEE Std 1722.1-2013 clause 7.3.5.2.3
typedef struct {
	// AVDECC_TODO
} openavb_aem_control_value_format_control_array_int8_t;

typedef struct {
	// AVDECC_TODO
} openavb_aem_control_value_format_control_array_uint8_t;

typedef struct {
	// AVDECC_TODO
} openavb_aem_control_value_format_control_array_int16_t;

typedef struct {
	// AVDECC_TODO
} openavb_aem_control_value_format_control_array_uint16_t;

typedef struct {
	// AVDECC_TODO
} openavb_aem_control_value_format_control_array_int32_t;

typedef struct {
	// AVDECC_TODO
} openavb_aem_control_value_format_control_array_uint32_t;

typedef struct {
	// AVDECC_TODO
} openavb_aem_control_value_format_control_array_int64_t;

typedef struct {
	// AVDECC_TODO
} openavb_aem_control_value_format_control_array_uint64_t;

typedef struct {
	// AVDECC_TODO
} openavb_aem_control_value_format_control_array_float_t;

typedef struct {
	// AVDECC_TODO
} openavb_aem_control_value_format_control_array_double_t;


// Values format for UTF-8 String Value Type (CONTROL_UTF8) IEEE Std 1722.1-2013 clause 7.3.5.2.4
typedef struct {
	// AVDECC_TODO
} openavb_aem_control_value_format_control_utf8_t;

// Values format for Bode Plot Value Type (CONTROL_BODE_PLOT) IEEE Std 1722.1-2013 clause 7.3.5.2.5
typedef struct {
	// AVDECC_TODO
} openavb_aem_control_value_format_control_bode_plot_t;

// Values format for SMPTE Time Type (CONTROL_SMPTE_TIME) IEEE Std 1722.1-2013 clause 7.3.5.2.6
typedef struct {
	// AVDECC_TODO
} openavb_aem_control_value_format_control_smpte_time_t;

// Values format for Sample Rate Type (CONTROL_SAMPLE_RATE) IEEE Std 1722.1-2013 clause 7.3.5.2.7
typedef struct {
	// AVDECC_TODO
} openavb_aem_control_value_format_control_sample_rate_t;

// Values format for gPTP Time Type (CONTROL_GPTP_TIME) IEEE Std 1722.1-2013 clause 7.3.5.2.8
typedef struct {
	// AVDECC_TODO
} openavb_aem_control_value_format_control_gptp_time_t;

// Values format for Vendor Defined Type (CONTROL_VENDOR) IEEE Std 1722.1-2013 clause 7.3.5.2.9
typedef struct {
	// AVDECC_TODO
} openavb_aem_control_value_format_control_vendor_t;


// Content Protection for Video Cluster Format Specific fields IEEE Std 1722.1-2013 clause 7.3.7.1.1
#define OPENAVB_AEM_VIDEO_CLUSTER_PROTECTION_NONE (0x0)
#define OPENAVB_AEM_VIDEO_CLUSTER_PROTECTION_HDCP (0x1)
#define OPENAVB_AEM_VIDEO_CLUSTER_PROTECTION_DTCP (0x2)
#define OPENAVB_AEM_VIDEO_CLUSTER_PROTECTION_AES_ENCRYPTION (0x3)

// Profiles for MPEG Elementary Streams IEEE Std 1722.1-2013 clause 7.3.7.2.1
#define OPENAVB_AEM_MPEG_PROFILE_H264_CBP (0x00)
#define OPENAVB_AEM_MPEG_PROFILE_H264_BP (0x01)
#define OPENAVB_AEM_MPEG_PROFILE_H264_MP (0x02)
#define OPENAVB_AEM_MPEG_PROFILE_H264_XP (0x03)
#define OPENAVB_AEM_MPEG_PROFILE_H264_HIP (0x04)
#define OPENAVB_AEM_MPEG_PROFILE_H264_PHIP (0x05)
#define OPENAVB_AEM_MPEG_PROFILE_H264_HI10P (0x06)
#define OPENAVB_AEM_MPEG_PROFILE_H264_HI422P (0x07)
#define OPENAVB_AEM_MPEG_PROFILE_H264_HI444PP (0x08)
#define OPENAVB_AEM_MPEG_PROFILE_H264_HI10I (0x09)
#define OPENAVB_AEM_MPEG_PROFILE_H264_HI422I (0x0a)
#define OPENAVB_AEM_MPEG_PROFILE_H264_HI444I (0x0b)
#define OPENAVB_AEM_MPEG_PROFILE_H264_CAVLC44I (0x0c)
#define OPENAVB_AEM_MPEG_PROFILE_H264_SBP (0x0d)
#define OPENAVB_AEM_MPEG_PROFILE_H264_SHP (0x0e)
#define OPENAVB_AEM_MPEG_PROFILE_H264_SHI (0x0f)
#define OPENAVB_AEM_MPEG_PROFILE_H264_STHP (0x10)
#define OPENAVB_AEM_MPEG_PROFILE_H264_MVHP (0x11)
#define OPENAVB_AEM_MPEG_PROFILE_MPEG2_SP (0x12)
#define OPENAVB_AEM_MPEG_PROFILE_MPEG2_MP (0x13)
#define OPENAVB_AEM_MPEG_PROFILE_MPEG2_SNR (0x14)
#define OPENAVB_AEM_MPEG_PROFILE_MPEG2_SPATIAL (0x15)
#define OPENAVB_AEM_MPEG_PROFILE_MPEG2_HP (0x16)
#define OPENAVB_AEM_MPEG_PROFILE_MPEG2_422 (0x17)
#define OPENAVB_AEM_MPEG_PROFILE_MPEG2_MVP (0x18)
#define OPENAVB_AEM_MPEG_PROFILE_MPEG1_LAYER2 (0x80)
#define OPENAVB_AEM_MPEG_PROFILE_MPEG1_LAYER3 (0x81)
#define OPENAVB_AEM_MPEG_PROFILE_MPEG2_LAYER2 (0x82)
#define OPENAVB_AEM_MPEG_PROFILE_MPEG2_LAYER3 (0x83)
#define OPENAVB_AEM_MPEG_PROFILE_DOLBY_DIGITAL (0x84)
#define OPENAVB_AEM_MPEG_PROFILE_DOLBY_DIGITAL_PLUS (0x85)
#define OPENAVB_AEM_MPEG_PROFILE_DOLBY_DIGITAL_TRUEHD (0x86)
#define OPENAVB_AEM_MPEG_PROFILE_DOLBY_PRO_LOGIC_II (0x87)
#define OPENAVB_AEM_MPEG_PROFILE_DOLBY_DIGITAL_EX (0x88)
#define OPENAVB_AEM_MPEG_PROFILE_DOLBY_DIGITAL_SURROUND_EX (0x89)
#define OPENAVB_AEM_MPEG_PROFILE_DOLBY_DIGITAL_LIVE (0x8a)
#define OPENAVB_AEM_MPEG_PROFILE_DTS_5_1 (0x8b)
#define OPENAVB_AEM_MPEG_PROFILE_DTS_ES_MATRIX (0x8c)
#define OPENAVB_AEM_MPEG_PROFILE_DTS_ES_DISCRETE (0x8d)
#define OPENAVB_AEM_MPEG_PROFILE_DTS_NEO_6 (0x8e)
#define OPENAVB_AEM_MPEG_PROFILE_DTS_NEO_X (0x8f)
#define OPENAVB_AEM_MPEG_PROFILE_DTS_96_24 (0x90)
#define OPENAVB_AEM_MPEG_PROFILE_DTS_HD (0x91)
#define OPENAVB_AEM_MPEG_PROFILE_DTS_HD_MASTER (0x92)
#define OPENAVB_AEM_MPEG_PROFILE_DTS_INTERACTIVE (0x93)
#define OPENAVB_AEM_MPEG_PROFILE_DTS_NEO_PC (0x94)
#define OPENAVB_AEM_MPEG_PROFILE_AAC_LC (0x95)
#define OPENAVB_AEM_MPEG_PROFILE_AAC_MAIN (0x96)
#define OPENAVB_AEM_MPEG_PROFILE_AAC_LD (0x97)
#define OPENAVB_AEM_MPEG_PROFILE_AAC_HE (0x98)
#define OPENAVB_AEM_MPEG_PROFILE_AAC_HE2 (0x99)

// Levels for H.264 Profiles IEEE Std 1722.1-2013 clause 7.3.7.2.2.1
#define OPENAVB_AEM_PROFILE_LEVEL_H264_1 (0x00)
#define OPENAVB_AEM_PROFILE_LEVEL_H264_1B (0x01)
#define OPENAVB_AEM_PROFILE_LEVEL_H264_1_1 (0x02)
#define OPENAVB_AEM_PROFILE_LEVEL_H264_1_2 (0x03)
#define OPENAVB_AEM_PROFILE_LEVEL_H264_1_3 (0x01)
#define OPENAVB_AEM_PROFILE_LEVEL_H264_2 (0x05)
#define OPENAVB_AEM_PROFILE_LEVEL_H264_2_1 (0x06)
#define OPENAVB_AEM_PROFILE_LEVEL_H264_2_2 (0x07)
#define OPENAVB_AEM_PROFILE_LEVEL_H264_3 (0x08)
#define OPENAVB_AEM_PROFILE_LEVEL_H264_3_1 (0x09)
#define OPENAVB_AEM_PROFILE_LEVEL_H264_3_2 (0x0a)
#define OPENAVB_AEM_PROFILE_LEVEL_H264_4 (0x0b)
#define OPENAVB_AEM_PROFILE_LEVEL_H264_4_1 (0x0c)
#define OPENAVB_AEM_PROFILE_LEVEL_H264_4_2 (0x0d)
#define OPENAVB_AEM_PROFILE_LEVEL_H264_5 (0x0e)
#define OPENAVB_AEM_PROFILE_LEVEL_H264_5_1 (0x0f)
#define OPENAVB_AEM_PROFILE_LEVEL_H264_5_2 (0x10)

// Levels for MPEG2 Profiles IEEE Std 1722.1-2013 clause 7.3.7.2.2.2
#define OPENAVB_AEM_PROFILE_LEVEL_MPEG2_LL (0x00)
#define OPENAVB_AEM_PROFILE_LEVEL_MPEG2_ML (0x01)
#define OPENAVB_AEM_PROFILE_LEVEL_MPEG2_H_14 (0x02)
#define OPENAVB_AEM_PROFILE_LEVEL_MPEG2_HL (0x03)

// Audio Profiles MPEG_PES_FORMAT Compressed Audio sample rates IEEE Std 1722.1-2013 clause 7.3.7.2.3
#define OPENAVB_AEM_MPEG_PES_FORMAT_COMPRESSED_AUDIO_SAMPLE_RATE_8K (0x0)
#define OPENAVB_AEM_MPEG_PES_FORMAT_COMPRESSED_AUDIO_SAMPLE_RATE_16K (0x1)
#define OPENAVB_AEM_MPEG_PES_FORMAT_COMPRESSED_AUDIO_SAMPLE_RATE_22K05 (0x2)
#define OPENAVB_AEM_MPEG_PES_FORMAT_COMPRESSED_AUDIO_SAMPLE_RATE_24K (0x3)
#define OPENAVB_AEM_MPEG_PES_FORMAT_COMPRESSED_AUDIO_SAMPLE_RATE_32K (0x4)
#define OPENAVB_AEM_MPEG_PES_FORMAT_COMPRESSED_AUDIO_SAMPLE_RATE_44K1 (0x5)
#define OPENAVB_AEM_MPEG_PES_FORMAT_COMPRESSED_AUDIO_SAMPLE_RATE_48K (0x6)
#define OPENAVB_AEM_MPEG_PES_FORMAT_COMPRESSED_AUDIO_SAMPLE_RATE_96K (0x7)
#define OPENAVB_AEM_MPEG_PES_FORMAT_COMPRESSED_AUDIO_SAMPLE_RATE_192K (0x8)

// Audio Profiles MPEG_PES_FORMAT Compressed Audio channel options IEEE Std 1722.1-2013 clause 7.3.7.2.3
#define OPENAVB_AEM_MPEG_PES_FORMAT_COMPRESSED_AUDIO_CHANNEL_OPTION_MONO (0x00)
#define OPENAVB_AEM_MPEG_PES_FORMAT_COMPRESSED_AUDIO_CHANNEL_OPTION_STEREO (0x01)
#define OPENAVB_AEM_MPEG_PES_FORMAT_COMPRESSED_AUDIO_CHANNEL_OPTION_STEREO_JOINED (0x02)
#define OPENAVB_AEM_MPEG_PES_FORMAT_COMPRESSED_AUDIO_CHANNEL_OPTION_DUAL_CHANNEL (0x03)
#define OPENAVB_AEM_MPEG_PES_FORMAT_COMPRESSED_AUDIO_CHANNEL_OPTION_2_1 (0x04)
#define OPENAVB_AEM_MPEG_PES_FORMAT_COMPRESSED_AUDIO_CHANNEL_OPTION_3_0 (0x05)
#define OPENAVB_AEM_MPEG_PES_FORMAT_COMPRESSED_AUDIO_CHANNEL_OPTION_3_1 (0x06)
#define OPENAVB_AEM_MPEG_PES_FORMAT_COMPRESSED_AUDIO_CHANNEL_OPTION_4_0 (0x07)
#define OPENAVB_AEM_MPEG_PES_FORMAT_COMPRESSED_AUDIO_CHANNEL_OPTION_4_1 (0x08)
#define OPENAVB_AEM_MPEG_PES_FORMAT_COMPRESSED_AUDIO_CHANNEL_OPTION_5_0 (0x09)
#define OPENAVB_AEM_MPEG_PES_FORMAT_COMPRESSED_AUDIO_CHANNEL_OPTION_5_1 (0x0a)
#define OPENAVB_AEM_MPEG_PES_FORMAT_COMPRESSED_AUDIO_CHANNEL_OPTION_6_0 (0x0b)
#define OPENAVB_AEM_MPEG_PES_FORMAT_COMPRESSED_AUDIO_CHANNEL_OPTION_6_1 (0x0c)
#define OPENAVB_AEM_MPEG_PES_FORMAT_COMPRESSED_AUDIO_CHANNEL_OPTION_7_0 (0x0d)
#define OPENAVB_AEM_MPEG_PES_FORMAT_COMPRESSED_AUDIO_CHANNEL_OPTION_7_1 (0x0e)
#define OPENAVB_AEM_MPEG_PES_FORMAT_COMPRESSED_AUDIO_CHANNEL_OPTION_8_0 (0x0f)
#define OPENAVB_AEM_MPEG_PES_FORMAT_COMPRESSED_AUDIO_CHANNEL_OPTION_10_1 (0x10)
#define OPENAVB_AEM_MPEG_PES_FORMAT_COMPRESSED_AUDIO_CHANNEL_OPTION_OTHER (0x1f)

// Audio Profiles MPEG_PES_FORMAT Compressed Audio bitrates IEEE Std 1722.1-2013 clause 7.3.7.2.3
#define OPENAVB_AEM_MPEG_PES_FORMAT_COMPRESSED_AUDIO_BITRATE_VARIABLE_BIT_RATE (0x00)
#define OPENAVB_AEM_MPEG_PES_FORMAT_COMPRESSED_AUDIO_BITRATE_16_KB_PER_SEC (0x01)
#define OPENAVB_AEM_MPEG_PES_FORMAT_COMPRESSED_AUDIO_BITRATE_24_KB_PER_SEC (0x02)
#define OPENAVB_AEM_MPEG_PES_FORMAT_COMPRESSED_AUDIO_BITRATE_32_KB_PER_SEC (0x03)
#define OPENAVB_AEM_MPEG_PES_FORMAT_COMPRESSED_AUDIO_BITRATE_40_KB_PER_SEC (0x01)
#define OPENAVB_AEM_MPEG_PES_FORMAT_COMPRESSED_AUDIO_BITRATE_48_KB_PER_SEC (0x05)
#define OPENAVB_AEM_MPEG_PES_FORMAT_COMPRESSED_AUDIO_BITRATE_56_KB_PER_SEC (0x06)
#define OPENAVB_AEM_MPEG_PES_FORMAT_COMPRESSED_AUDIO_BITRATE_64_KB_PER_SEC (0x07)
#define OPENAVB_AEM_MPEG_PES_FORMAT_COMPRESSED_AUDIO_BITRATE_80_KB_PER_SEC (0x08)
#define OPENAVB_AEM_MPEG_PES_FORMAT_COMPRESSED_AUDIO_BITRATE_96_KB_PER_SEC (0x09)
#define OPENAVB_AEM_MPEG_PES_FORMAT_COMPRESSED_AUDIO_BITRATE_112_KB_PER_SEC (0x0a)
#define OPENAVB_AEM_MPEG_PES_FORMAT_COMPRESSED_AUDIO_BITRATE_128_KB_PER_SEC (0x0b)
#define OPENAVB_AEM_MPEG_PES_FORMAT_COMPRESSED_AUDIO_BITRATE_144_KB_PER_SEC (0x0c)
#define OPENAVB_AEM_MPEG_PES_FORMAT_COMPRESSED_AUDIO_BITRATE_160_KB_PER_SEC (0x0d)
#define OPENAVB_AEM_MPEG_PES_FORMAT_COMPRESSED_AUDIO_BITRATE_192_KB_PER_SEC (0x0e)
#define OPENAVB_AEM_MPEG_PES_FORMAT_COMPRESSED_AUDIO_BITRATE_224_KB_PER_SEC (0x0f)
#define OPENAVB_AEM_MPEG_PES_FORMAT_COMPRESSED_AUDIO_BITRATE_256_KB_PER_SEC (0x10)
#define OPENAVB_AEM_MPEG_PES_FORMAT_COMPRESSED_AUDIO_BITRATE_288_KB_PER_SEC (0x11)
#define OPENAVB_AEM_MPEG_PES_FORMAT_COMPRESSED_AUDIO_BITRATE_320_KB_PER_SEC (0x12)
#define OPENAVB_AEM_MPEG_PES_FORMAT_COMPRESSED_AUDIO_BITRATE_352_KB_PER_SEC (0x13)
#define OPENAVB_AEM_MPEG_PES_FORMAT_COMPRESSED_AUDIO_BITRATE_384_KB_PER_SEC (0x14)
#define OPENAVB_AEM_MPEG_PES_FORMAT_COMPRESSED_AUDIO_BITRATE_OTHER (0x7f)

// RTP Payload Subtypes IEEE Std 1722.1-2013 clause 7.3.7.4.1
#define OPENAVB_AEM_RTP_PAYLOAD_SUBTYPE_RTP_MJPEG (0x0000)
#define OPENAVB_AEM_RTP_PAYLOAD_SUBTYPE_RTP_H264 (0x0001)
#define OPENAVB_AEM_RTP_PAYLOAD_SUBTYPE_RTP_JPEG200 (0x0002)

// Video Cluster Color Space IEEE Std 1722.1-2013 clause 7.3.10
#define OPENAVB_AEM_VIDEP_CLUSTER_COLOR_SPACE_MONO8 (0x0000)
#define OPENAVB_AEM_VIDEP_CLUSTER_COLOR_SPACE_MONO12_PACKED (0x0001)
#define OPENAVB_AEM_VIDEP_CLUSTER_COLOR_SPACE_MONO16 (0x0002)
#define OPENAVB_AEM_VIDEP_CLUSTER_COLOR_SPACE_MONO16_SIGNED (0x0003)
#define OPENAVB_AEM_VIDEP_CLUSTER_COLOR_SPACE_YUV411_PACKED (0x0004)
#define OPENAVB_AEM_VIDEP_CLUSTER_COLOR_SPACE_YUV422_PACKED (0x0005)
#define OPENAVB_AEM_VIDEP_CLUSTER_COLOR_SPACE_YUV444_PACKED (0x0006)
#define OPENAVB_AEM_VIDEP_CLUSTER_COLOR_SPACE_RGB_PACKED (0x0007)
#define OPENAVB_AEM_VIDEP_CLUSTER_COLOR_SPACE_RGB16 (0x0008)
#define OPENAVB_AEM_VIDEP_CLUSTER_COLOR_SPACE_RGB16_SIGNED (0x0009)
#define OPENAVB_AEM_VIDEP_CLUSTER_COLOR_SPACE_BAYERGR8 (0x000a)
#define OPENAVB_AEM_VIDEP_CLUSTER_COLOR_SPACE_BAYERGR12_PACKED (0x000b)
#define OPENAVB_AEM_VIDEP_CLUSTER_COLOR_SPACE_BAYERGR16 (0x000c)
#define OPENAVB_AEM_VIDEP_CLUSTER_COLOR_SPACE_BAYERRG8 (0x000d)
#define OPENAVB_AEM_VIDEP_CLUSTER_COLOR_SPACE_BAYERRG12_PACKED (0x000e)
#define OPENAVB_AEM_VIDEP_CLUSTER_COLOR_SPACE_BAYERRG16 (0x000f)
#define OPENAVB_AEM_VIDEP_CLUSTER_COLOR_SPACE_BAYERGB8 (0x0010)
#define OPENAVB_AEM_VIDEP_CLUSTER_COLOR_SPACE_BAYERGB12_PACKED (0x0011)
#define OPENAVB_AEM_VIDEP_CLUSTER_COLOR_SPACE_BAYERGB16 (0x0012)
#define OPENAVB_AEM_VIDEP_CLUSTER_COLOR_SPACE_BAYERBG8 (0x0013)
#define OPENAVB_AEM_VIDEP_CLUSTER_COLOR_SPACE_BAYERBG12_PACKED (0x0014)
#define OPENAVB_AEM_VIDEP_CLUSTER_COLOR_SPACE_BAYERBG16 (0x0015)

// Command Codes IEEE Std 1722.1-2013 clause 7.4
#define OPENAVB_AEM_COMMAND_CODE_ACQUIRE_ENTITY (0x0000)
#define OPENAVB_AEM_COMMAND_CODE_LOCK_ENTITY (0x0001)
#define OPENAVB_AEM_COMMAND_CODE_ENTITY_AVAILABLE (0x0002)
#define OPENAVB_AEM_COMMAND_CODE_CONTROLLER_AVAILABLE (0x0003)
#define OPENAVB_AEM_COMMAND_CODE_READ_DESCRIPTOR (0x0004)
#define OPENAVB_AEM_COMMAND_CODE_WRITE_DESCRIPTOR (0x0005)
#define OPENAVB_AEM_COMMAND_CODE_SET_CONFIGURATION (0x0006)
#define OPENAVB_AEM_COMMAND_CODE_GET_CONFIGURATION (0x0007)
#define OPENAVB_AEM_COMMAND_CODE_SET_STREAM_FORMAT (0x0008)
#define OPENAVB_AEM_COMMAND_CODE_GET_STREAM_FORMAT (0x0009)
#define OPENAVB_AEM_COMMAND_CODE_SET_VIDEO_FORMAT (0x000a)
#define OPENAVB_AEM_COMMAND_CODE_GET_VIDEO_FORMAT (0x000b)
#define OPENAVB_AEM_COMMAND_CODE_SET_SENSOR_FORMAT (0x000c)
#define OPENAVB_AEM_COMMAND_CODE_GET_SENSOR_FORMAT (0x000d)
#define OPENAVB_AEM_COMMAND_CODE_SET_STREAM_INFO (0x000e)
#define OPENAVB_AEM_COMMAND_CODE_GET_STREAM_INFO (0x000f)
#define OPENAVB_AEM_COMMAND_CODE_SET_NAME (0x0010)
#define OPENAVB_AEM_COMMAND_CODE_GET_NAME (0x0011)
#define OPENAVB_AEM_COMMAND_CODE_SET_ASSOCIATION_ID (0x0012)
#define OPENAVB_AEM_COMMAND_CODE_GET_ASSOCIATION_ID (0x0013)
#define OPENAVB_AEM_COMMAND_CODE_SET_SAMPLING_RATE (0x0014)
#define OPENAVB_AEM_COMMAND_CODE_GET_SAMPLING_RATE (0x0015)
#define OPENAVB_AEM_COMMAND_CODE_SET_CLOCK_SOURCE (0x0016)
#define OPENAVB_AEM_COMMAND_CODE_GET_CLOCK_SOURCE (0x0017)
#define OPENAVB_AEM_COMMAND_CODE_SET_CONTROL (0x0018)
#define OPENAVB_AEM_COMMAND_CODE_GET_CONTROL (0x0019)
#define OPENAVB_AEM_COMMAND_CODE_INCREMENT_CONTROL (0x001a)
#define OPENAVB_AEM_COMMAND_CODE_DECREMENT_CONTROL (0x001b)
#define OPENAVB_AEM_COMMAND_CODE_SET_SIGNAL_SELECTOR (0x001c)
#define OPENAVB_AEM_COMMAND_CODE_GET_SIGNAL_SELECTOR (0x001d)
#define OPENAVB_AEM_COMMAND_CODE_SET_MIXER (0x001e)
#define OPENAVB_AEM_COMMAND_CODE_GET_MIXER (0x001f)
#define OPENAVB_AEM_COMMAND_CODE_SET_MATRIX (0x0020)
#define OPENAVB_AEM_COMMAND_CODE_GET_MATRIX (0x0021)
#define OPENAVB_AEM_COMMAND_CODE_START_STREAMING (0x0022)
#define OPENAVB_AEM_COMMAND_CODE_STOP_STREAMING (0x0023)
#define OPENAVB_AEM_COMMAND_CODE_REGISTER_UNSOLICITED_NOTIFICATION (0x0024)
#define OPENAVB_AEM_COMMAND_CODE_DEREGISTER_UNSOLICITED_NOTIFICATION (0x0025)
#define OPENAVB_AEM_COMMAND_CODE_IDENTIFY_NOTIFICATION (0x0026)
#define OPENAVB_AEM_COMMAND_CODE_GET_AVB_INFO (0x0027)
#define OPENAVB_AEM_COMMAND_CODE_GET_AS_PATH (0x0028)
#define OPENAVB_AEM_COMMAND_CODE_GET_COUNTERS (0x0029)
#define OPENAVB_AEM_COMMAND_CODE_REBOOT (0x002a)
#define OPENAVB_AEM_COMMAND_CODE_GET_AUDIO_MAP (0x002b)
#define OPENAVB_AEM_COMMAND_CODE_ADD_AUDIO_MAPPINGS (0x002c)
#define OPENAVB_AEM_COMMAND_CODE_REMOVE_AUDIO_MAPPINGS (0x002d)
#define OPENAVB_AEM_COMMAND_CODE_GET_VIDEO_MAP (0x002e)
#define OPENAVB_AEM_COMMAND_CODE_ADD_VIDEO_MAPPINGS (0x002f)
#define OPENAVB_AEM_COMMAND_CODE_REMOVE_VIDEO_MAPPINGS (0x0030)
#define OPENAVB_AEM_COMMAND_CODE_GET_SENSOR_MAP (0x0031)
#define OPENAVB_AEM_COMMAND_CODE_ADD_SENSOR_MAPPINGS (0x0032)
#define OPENAVB_AEM_COMMAND_CODE_REMOVE_SENSOR_MAPPINGS (0x0033)
#define OPENAVB_AEM_COMMAND_CODE_START_OPERATION (0x0034)
#define OPENAVB_AEM_COMMAND_CODE_ABORT_OPERATION (0x0035)
#define OPENAVB_AEM_COMMAND_CODE_OPERATION_STATUS (0x0036)
#define OPENAVB_AEM_COMMAND_CODE_AUTH_ADD_KEY (0x0037)
#define OPENAVB_AEM_COMMAND_CODE_AUTH_DELETE_KEY (0x0038)
#define OPENAVB_AEM_COMMAND_CODE_AUTH_GET_KEY_LIST (0x0039)
#define OPENAVB_AEM_COMMAND_CODE_AUTH_GET_KEY (0x003a)
#define OPENAVB_AEM_COMMAND_CODE_AUTH_ADD_KEY_TO_CHAIN (0x003b)
#define OPENAVB_AEM_COMMAND_CODE_AUTH_DELETE_KEY_FROM_CHAIN (0x003c)
#define OPENAVB_AEM_COMMAND_CODE_AUTH_GET_KEYCHAIN_LIST (0x003d)
#define OPENAVB_AEM_COMMAND_CODE_AUTH_GET_IDENTITY (0x003e)
#define OPENAVB_AEM_COMMAND_CODE_AUTH_ADD_TOKEN (0x003f)
#define OPENAVB_AEM_COMMAND_CODE_AUTH_DELETE_TOKEN (0x0040)
#define OPENAVB_AEM_COMMAND_CODE_AUTHENTICATE (0x0041)
#define OPENAVB_AEM_COMMAND_CODE_DEAUTHENTICATE (0x0042)
#define OPENAVB_AEM_COMMAND_CODE_ENABLE_TRANSPORT_SECURITY (0x0043)
#define OPENAVB_AEM_COMMAND_CODE_DISABLE_TRANSPORT_SECURITY (0x0044)
#define OPENAVB_AEM_COMMAND_CODE_ENABLE_STREAM_ENCRYPTION (0x0045)
#define OPENAVB_AEM_COMMAND_CODE_DISABLE_STREAM_ENCRYPTION (0x0046)
#define OPENAVB_AEM_COMMAND_CODE_SET_MEMORY_OBJECT_LENGTH (0x0047)
#define OPENAVB_AEM_COMMAND_CODE_GET_MEMORY_OBJECT_LENGTH (0x0048)
#define OPENAVB_AEM_COMMAND_CODE_SET_STREAM_BACKUP (0x0049)
#define OPENAVB_AEM_COMMAND_CODE_GET_STREAM_BACKUP (0x004a)
#define OPENAVB_AEM_COMMAND_CODE_EXPANSION (0x7fff)

// Command Status IEEE Std 1722.1-2013 clause 7.4
#define OPENAVB_AEM_COMMAND_STATUS_SUCCESS (0)
#define OPENAVB_AEM_COMMAND_STATUS_NOT_IMPLEMENTED (1)
#define OPENAVB_AEM_COMMAND_STATUS_NO_SUCH_DESCRIPTOR (2)
#define OPENAVB_AEM_COMMAND_STATUS_ENTITY_LOCKED (3)
#define OPENAVB_AEM_COMMAND_STATUS_ENTITY_ACQUIRED (4)
#define OPENAVB_AEM_COMMAND_STATUS_NOT_AUTHENTICATED (5)
#define OPENAVB_AEM_COMMAND_STATUS_AUTHENTICATION_DISABLED (6)
#define OPENAVB_AEM_COMMAND_STATUS_BAD_ARGUMENTS (7)
#define OPENAVB_AEM_COMMAND_STATUS_NO_RESOURCES (8)
#define OPENAVB_AEM_COMMAND_STATUS_IN_PROGRESS (9)
#define OPENAVB_AEM_COMMAND_STATUS_ENTITY_MISBEHAVING (10)
#define OPENAVB_AEM_COMMAND_STATUS_NOT_SUPPORTED (11)
#define OPENAVB_AEM_COMMAND_STATUS_STREAM_IS_RUNNING (12)

// ACQUIRE_ENTITY Command Flags IEEE Std 1722.1-2013 clause 7.4.1
#define OPENAVB_AEM_ACQUIRE_ENTITY_COMMAND_FLAG_PERSISTENT (0x00000001)
#define OPENAVB_AEM_ACQUIRE_ENTITY_COMMAND_FLAG_RELEASE (0x80000000)

// LOCK ENTITY Command Flags IEEE Std 1722.1-2013 clause 7.4.2
#define OPENAVB_AEM_LOCK_ENTITY_COMMAND_FLAG_UNLOCK (ox00000001)

// SET_STREAM_INFO Command Flags IEEE Std 1722.1-2013 clause 7.4.15
#define OPENAVB_AEM_SET_STREAM_INFO_COMMAND_FLAG_CLASS_B (0x00000001)
#define OPENAVB_AEM_SET_STREAM_INFO_COMMAND_FLAG_FAST_CONNECT (0x00000002)
#define OPENAVB_AEM_SET_STREAM_INFO_COMMAND_FLAG_SAVED_STATE (0x00000004)
#define OPENAVB_AEM_SET_STREAM_INFO_COMMAND_FLAG_STREAMING_WAIT (0x00000008)
#define OPENAVB_AEM_SET_STREAM_INFO_COMMAND_FLAG_ENCRYPTED_PDU (0x00000010)
#define OPENAVB_AEM_SET_STREAM_INFO_COMMAND_FLAG_STREAM_VLAN_ID_VALID (0x02000000)
#define OPENAVB_AEM_SET_STREAM_INFO_COMMAND_FLAG_CONNECTED (0x04000000)
#define OPENAVB_AEM_SET_STREAM_INFO_COMMAND_FLAG_MSRP_FAILURE_VALID (0x08000000)
#define OPENAVB_AEM_SET_STREAM_INFO_COMMAND_FLAG_STREAM_DEST_MAC_VALID  (0x10000000)
#define OPENAVB_AEM_SET_STREAM_INFO_COMMAND_FLAG_MSRP_ACC_LAT_VALID (0x20000000)
#define OPENAVB_AEM_SET_STREAM_INFO_COMMAND_FLAG_STREAM_ID_VALID (0x40000000)
#define OPENAVB_AEM_SET_STREAM_INFO_COMMAND_FLAG_STREAM_FORMAT_VALID (0x80000000)

// SET_MATRIX Command Direction IEEE Std 1722.1-2013 clause 7.4.33
#define OPENAVB_AEM_SET_MATRIX_COMMAND_DIRECTION_HORIZONTAL (0)
#define OPENAVB_AEM_SET_MATRIX_COMMAND_DIRECTION_VERTICAL (1)

// GET_AVB_INFO Command Flags IEEE Std 1722.1-2013 clause 7.4.40
#define OPENAVB_AEM_GET_AVB_INFO_COMMAND_FLAG_AS_CAPABLE (0x01)
#define OPENAVB_AEM_GET_AVB_INFO_COMMAND_GPTP_ENABLED (0x02)
#define OPENAVB_AEM_GET_AVB_INFO_COMMAND_SRP_ENABLED (0x04)

// GET_COUNTERS Command ENTITY Counters IEEE Std 1722.1-2013 clause 7.4.42
#define OPENAVB_AEM_GET_COUNTERS_COMMAND_ENTITY_COUNTER_ENTITY_SPECIFIC_8 (0x01000000)
#define OPENAVB_AEM_GET_COUNTERS_COMMAND_ENTITY_COUNTER_ENTITY_SPECIFIC_7 (0x02000000)
#define OPENAVB_AEM_GET_COUNTERS_COMMAND_ENTITY_COUNTER_ENTITY_SPECIFIC_6 (0x04000000)
#define OPENAVB_AEM_GET_COUNTERS_COMMAND_ENTITY_COUNTER_ENTITY_SPECIFIC_5 (0x08000000)
#define OPENAVB_AEM_GET_COUNTERS_COMMAND_ENTITY_COUNTER_ENTITY_SPECIFIC_4 (0x10000000)
#define OPENAVB_AEM_GET_COUNTERS_COMMAND_ENTITY_COUNTER_ENTITY_SPECIFIC_3 (0x20000000)
#define OPENAVB_AEM_GET_COUNTERS_COMMAND_ENTITY_COUNTER_ENTITY_SPECIFIC_2 (0x40000000)
#define OPENAVB_AEM_GET_COUNTERS_COMMAND_ENTITY_COUNTER_ENTITY_SPECIFIC_1 (0x80000000)

// GET_COUNTERS Command AVB_INTERFACE Counters IEEE Std 1722.1-2013 clause 7.4.42
#define OPENAVB_AEM_GET_COUNTERS_COMMAND_AVB_INTERFACE_COUNTER_LINK_UP (0x00000001)
#define OPENAVB_AEM_GET_COUNTERS_COMMAND_AVB_INTERFACE_COUNTER_LINK_DOWN (0x00000002)
#define OPENAVB_AEM_GET_COUNTERS_COMMAND_AVB_INTERFACE_COUNTER_FRAMES_TX (0x00000004)
#define OPENAVB_AEM_GET_COUNTERS_COMMAND_AVB_INTERFACE_COUNTER_FRAMES_RX (0x00000008)
#define OPENAVB_AEM_GET_COUNTERS_COMMAND_AVB_INTERFACE_COUNTER_RX_CRC_ERROR (0x00000010)
#define OPENAVB_AEM_GET_COUNTERS_COMMAND_AVB_INTERFACE_COUNTER_GPTP_GM_CHANGED (0x00000020)
#define OPENAVB_AEM_GET_COUNTERS_COMMAND_AVB_INTERFACE_COUNTER_ENTITY_SPECIFIC_8 (0x01000000)
#define OPENAVB_AEM_GET_COUNTERS_COMMAND_AVB_INTERFACE_COUNTER_ENTITY_SPECIFIC_7 (0x02000000)
#define OPENAVB_AEM_GET_COUNTERS_COMMAND_AVB_INTERFACE_COUNTER_ENTITY_SPECIFIC_6 (0x04000000)
#define OPENAVB_AEM_GET_COUNTERS_COMMAND_AVB_INTERFACE_COUNTER_ENTITY_SPECIFIC_5 (0x08000000)
#define OPENAVB_AEM_GET_COUNTERS_COMMAND_AVB_INTERFACE_COUNTER_ENTITY_SPECIFIC_4 (0x10000000)
#define OPENAVB_AEM_GET_COUNTERS_COMMAND_AVB_INTERFACE_COUNTER_ENTITY_SPECIFIC_3 (0x20000000)
#define OPENAVB_AEM_GET_COUNTERS_COMMAND_AVB_INTERFACE_COUNTER_ENTITY_SPECIFIC_2 (0x40000000)
#define OPENAVB_AEM_GET_COUNTERS_COMMAND_AVB_INTERFACE_COUNTER_ENTITY_SPECIFIC_1 (0x80000000)

// GET_COUNTERS Command CLOCK_DOMAIN Counters IEEE Std 1722.1-2013 clause 7.4.42
#define OPENAVB_AEM_GET_COUNTERS_COMMAND_CLOCK_DOMAIN_COUNTER_LOCKED (0x00000001)
#define OPENAVB_AEM_GET_COUNTERS_COMMAND_CLOCK_DOMAIN_COUNTER_UNLOCKED (0x00000002)
#define OPENAVB_AEM_GET_COUNTERS_COMMAND_CLOCK_DOMAIN_COUNTER_ENTITY_SPECIFIC_1 (0x01000000)
#define OPENAVB_AEM_GET_COUNTERS_COMMAND_CLOCK_DOMAIN_COUNTER_ENTITY_SPECIFIC_2 (0x02000000)
#define OPENAVB_AEM_GET_COUNTERS_COMMAND_CLOCK_DOMAIN_COUNTER_ENTITY_SPECIFIC_3 (0x04000000)
#define OPENAVB_AEM_GET_COUNTERS_COMMAND_CLOCK_DOMAIN_COUNTER_ENTITY_SPECIFIC_4 (0x08000000)
#define OPENAVB_AEM_GET_COUNTERS_COMMAND_CLOCK_DOMAIN_COUNTER_ENTITY_SPECIFIC_5 (0x10000000)
#define OPENAVB_AEM_GET_COUNTERS_COMMAND_CLOCK_DOMAIN_COUNTER_ENTITY_SPECIFIC_6 (0x20000000)
#define OPENAVB_AEM_GET_COUNTERS_COMMAND_CLOCK_DOMAIN_COUNTER_ENTITY_SPECIFIC_7 (0x40000000)
#define OPENAVB_AEM_GET_COUNTERS_COMMAND_CLOCK_DOMAIN_COUNTER_ENTITY_SPECIFIC_8 (0x80000000)

// GET_COUNTERS Command STREAM_INPUT Counters IEEE Std 1722.1-2013 clause 7.4.42
#define OPENAVB_AEM_GET_COUNTERS_COMMAND_STREAM_INPUT_COUNTER_MEDIA_LOCKED (0x00000001)
#define OPENAVB_AEM_GET_COUNTERS_COMMAND_STREAM_INPUT_COUNTER_MEDIA_UNLOCKED (0x00000002)
#define OPENAVB_AEM_GET_COUNTERS_COMMAND_STREAM_INPUT_COUNTER_STREAM_RESET (0x00000004)
#define OPENAVB_AEM_GET_COUNTERS_COMMAND_STREAM_INPUT_COUNTER_SEQ_NUM_MISMATCH (0x00000008)
#define OPENAVB_AEM_GET_COUNTERS_COMMAND_STREAM_INPUT_COUNTER_MEDIA_RESET (0x00000010)
#define OPENAVB_AEM_GET_COUNTERS_COMMAND_STREAM_INPUT_COUNTER_TIMESTAMP_UNCERTAIN (0x00000020)
#define OPENAVB_AEM_GET_COUNTERS_COMMAND_STREAM_INPUT_COUNTER_TIMESTAMP_VALID (0x00000040)
#define OPENAVB_AEM_GET_COUNTERS_COMMAND_STREAM_INPUT_COUNTER_TIMESTAMP_NOT_VALID (0x00000080)
#define OPENAVB_AEM_GET_COUNTERS_COMMAND_STREAM_INPUT_COUNTER_UNSUPPORTED_FORMAT (0x00000100)
#define OPENAVB_AEM_GET_COUNTERS_COMMAND_STREAM_INPUT_COUNTER_LATE_TIMESTAMP (0x00000200)
#define OPENAVB_AEM_GET_COUNTERS_COMMAND_STREAM_INPUT_COUNTER_EARLY_TIMESTAMP (0x00000400)
#define OPENAVB_AEM_GET_COUNTERS_COMMAND_STREAM_INPUT_COUNTER_FRAMES_RX (0x00000800)
#define OPENAVB_AEM_GET_COUNTERS_COMMAND_STREAM_INPUT_COUNTER_FRAMES_TX (0x00001000)
#define OPENAVB_AEM_GET_COUNTERS_COMMAND_STREAM_INPUT_COUNTER_ENTITY_SPECIFIC_8 (0x01000000)
#define OPENAVB_AEM_GET_COUNTERS_COMMAND_STREAM_INPUT_COUNTER_ENTITY_SPECIFIC_7 (0x02000000)
#define OPENAVB_AEM_GET_COUNTERS_COMMAND_STREAM_INPUT_COUNTER_ENTITY_SPECIFIC_6 (0x04000000)
#define OPENAVB_AEM_GET_COUNTERS_COMMAND_STREAM_INPUT_COUNTER_ENTITY_SPECIFIC_5 (0x08000000)
#define OPENAVB_AEM_GET_COUNTERS_COMMAND_STREAM_INPUT_COUNTER_ENTITY_SPECIFIC_4 (0x10000000)
#define OPENAVB_AEM_GET_COUNTERS_COMMAND_STREAM_INPUT_COUNTER_ENTITY_SPECIFIC_3 (0x20000000)
#define OPENAVB_AEM_GET_COUNTERS_COMMAND_STREAM_INPUT_COUNTER_ENTITY_SPECIFIC_2 (0x40000000)
#define OPENAVB_AEM_GET_COUNTERS_COMMAND_STREAM_INPUT_COUNTER_ENTITY_SPECIFIC_1 (0x80000000)

#endif // OPENAVB_AEM_TYPES_PUB_H
